Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAPDSS: RFBI: remove code related to old panel model

Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the RFBI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>

+19 -142
+19 -116
drivers/video/omap2/dss/rfbi.c
··· 151 151 WARN_ON(r < 0 && r != -ENOSYS); 152 152 } 153 153 154 - void rfbi_bus_lock(void) 154 + static void rfbi_bus_lock(void) 155 155 { 156 156 down(&rfbi.bus_lock); 157 157 } 158 - EXPORT_SYMBOL(rfbi_bus_lock); 159 158 160 - void rfbi_bus_unlock(void) 159 + static void rfbi_bus_unlock(void) 161 160 { 162 161 up(&rfbi.bus_lock); 163 162 } 164 - EXPORT_SYMBOL(rfbi_bus_unlock); 165 163 166 - void omap_rfbi_write_command(const void *buf, u32 len) 164 + static void rfbi_write_command(const void *buf, u32 len) 167 165 { 168 166 switch (rfbi.parallelmode) { 169 167 case OMAP_DSS_RFBI_PARALLELMODE_8: ··· 187 189 BUG(); 188 190 } 189 191 } 190 - EXPORT_SYMBOL(omap_rfbi_write_command); 191 192 192 - void omap_rfbi_read_data(void *buf, u32 len) 193 + static void rfbi_read_data(void *buf, u32 len) 193 194 { 194 195 switch (rfbi.parallelmode) { 195 196 case OMAP_DSS_RFBI_PARALLELMODE_8: ··· 218 221 BUG(); 219 222 } 220 223 } 221 - EXPORT_SYMBOL(omap_rfbi_read_data); 222 224 223 - void omap_rfbi_write_data(const void *buf, u32 len) 225 + static void rfbi_write_data(const void *buf, u32 len) 224 226 { 225 227 switch (rfbi.parallelmode) { 226 228 case OMAP_DSS_RFBI_PARALLELMODE_8: ··· 246 250 247 251 } 248 252 } 249 - EXPORT_SYMBOL(omap_rfbi_write_data); 250 253 251 - void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, 254 + static void rfbi_write_pixels(const void __iomem *buf, int scr_width, 252 255 u16 x, u16 y, 253 256 u16 w, u16 h) 254 257 { ··· 300 305 BUG(); 301 306 } 302 307 } 303 - EXPORT_SYMBOL(omap_rfbi_write_pixels); 304 308 305 309 static int rfbi_transfer_area(struct omap_dss_device *dssdev, 306 310 void (*callback)(void *data), void *data) ··· 568 574 } 569 575 570 576 /* xxx FIX module selection missing */ 571 - int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, 577 + static int rfbi_setup_te(enum omap_rfbi_te_mode mode, 572 578 unsigned hs_pulse_time, unsigned vs_pulse_time, 573 579 int hs_pol_inv, int vs_pol_inv, int extif_div) 574 580 { ··· 607 613 608 614 return 0; 609 615 } 610 - EXPORT_SYMBOL(omap_rfbi_setup_te); 611 616 612 617 /* xxx FIX module selection missing */ 613 - int omap_rfbi_enable_te(bool enable, unsigned line) 618 + static int rfbi_enable_te(bool enable, unsigned line) 614 619 { 615 620 u32 l; 616 621 ··· 629 636 630 637 return 0; 631 638 } 632 - EXPORT_SYMBOL(omap_rfbi_enable_te); 633 639 634 - static int rfbi_configure(int rfbi_module, int bpp, int lines) 640 + static int rfbi_configure_bus(int rfbi_module, int bpp, int lines) 635 641 { 636 642 u32 l; 637 643 int cycle1 = 0, cycle2 = 0, cycle3 = 0; ··· 762 770 return 0; 763 771 } 764 772 765 - int omap_rfbi_configure(struct omap_dss_device *dssdev) 773 + static int rfbi_configure(struct omap_dss_device *dssdev) 766 774 { 767 - return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, 775 + return rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, 768 776 rfbi.data_lines); 769 777 } 770 - EXPORT_SYMBOL(omap_rfbi_configure); 771 778 772 - int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), 779 + static int rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), 773 780 void *data) 774 781 { 775 782 return rfbi_transfer_area(dssdev, callback, data); 776 783 } 777 - EXPORT_SYMBOL(omap_rfbi_update); 778 784 779 - void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) 785 + static void rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) 780 786 { 781 787 rfbi.timings.x_res = w; 782 788 rfbi.timings.y_res = h; 783 789 } 784 - EXPORT_SYMBOL(omapdss_rfbi_set_size); 785 790 786 - void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) 791 + static void rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) 787 792 { 788 793 rfbi.pixel_size = pixel_size; 789 794 } 790 - EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); 791 795 792 - void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) 796 + static void rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) 793 797 { 794 798 rfbi.data_lines = data_lines; 795 799 } 796 - EXPORT_SYMBOL(omapdss_rfbi_set_data_lines); 797 800 798 - void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, 801 + static void rfbi_set_interface_timings(struct omap_dss_device *dssdev, 799 802 struct rfbi_timings *timings) 800 803 { 801 804 rfbi.intf_timings = *timings; 802 805 } 803 - EXPORT_SYMBOL(omapdss_rfbi_set_interface_timings); 804 806 805 807 static void rfbi_dump_regs(struct seq_file *s) 806 808 { ··· 874 888 dss_mgr_set_timings(mgr, &rfbi.timings); 875 889 } 876 890 877 - int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) 891 + static int rfbi_display_enable(struct omap_dss_device *dssdev) 878 892 { 879 893 struct omap_dss_device *out = &rfbi.output; 880 894 int r; ··· 897 911 898 912 rfbi_config_lcd_manager(dssdev); 899 913 900 - rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, 914 + rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, 901 915 rfbi.data_lines); 902 916 903 917 rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings); ··· 907 921 rfbi_runtime_put(); 908 922 return r; 909 923 } 910 - EXPORT_SYMBOL(omapdss_rfbi_display_enable); 911 924 912 - void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) 925 + static void rfbi_display_disable(struct omap_dss_device *dssdev) 913 926 { 914 927 struct omap_dss_device *out = &rfbi.output; 915 928 ··· 917 932 918 933 rfbi_runtime_put(); 919 934 } 920 - EXPORT_SYMBOL(omapdss_rfbi_display_disable); 921 935 922 936 static int rfbi_init_display(struct omap_dss_device *dssdev) 923 937 { 924 938 rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev; 925 - return 0; 926 - } 927 - 928 - static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev) 929 - { 930 - struct omap_dss_board_info *pdata = pdev->dev.platform_data; 931 - const char *def_disp_name = omapdss_get_default_display_name(); 932 - struct omap_dss_device *def_dssdev; 933 - int i; 934 - 935 - def_dssdev = NULL; 936 - 937 - for (i = 0; i < pdata->num_devices; ++i) { 938 - struct omap_dss_device *dssdev = pdata->devices[i]; 939 - 940 - if (dssdev->type != OMAP_DISPLAY_TYPE_DBI) 941 - continue; 942 - 943 - if (def_dssdev == NULL) 944 - def_dssdev = dssdev; 945 - 946 - if (def_disp_name != NULL && 947 - strcmp(dssdev->name, def_disp_name) == 0) { 948 - def_dssdev = dssdev; 949 - break; 950 - } 951 - } 952 - 953 - return def_dssdev; 954 - } 955 - 956 - static int rfbi_probe_pdata(struct platform_device *rfbidev) 957 - { 958 - struct omap_dss_device *plat_dssdev; 959 - struct omap_dss_device *dssdev; 960 - int r; 961 - 962 - plat_dssdev = rfbi_find_dssdev(rfbidev); 963 - 964 - if (!plat_dssdev) 965 - return 0; 966 - 967 - dssdev = dss_alloc_and_init_device(&rfbidev->dev); 968 - if (!dssdev) 969 - return -ENOMEM; 970 - 971 - dss_copy_device_pdata(dssdev, plat_dssdev); 972 - 973 - r = rfbi_init_display(dssdev); 974 - if (r) { 975 - DSSERR("device %s init failed: %d\n", dssdev->name, r); 976 - dss_put_device(dssdev); 977 - return r; 978 - } 979 - 980 - r = omapdss_output_set_device(&rfbi.output, dssdev); 981 - if (r) { 982 - DSSERR("failed to connect output to new device: %s\n", 983 - dssdev->name); 984 - dss_put_device(dssdev); 985 - return r; 986 - } 987 - 988 - r = dss_add_device(dssdev); 989 - if (r) { 990 - DSSERR("device %s register failed: %d\n", dssdev->name, r); 991 - omapdss_output_unset_device(&rfbi.output); 992 - dss_put_device(dssdev); 993 - return r; 994 - } 995 - 996 939 return 0; 997 940 } 998 941 ··· 998 1085 999 1086 rfbi_init_output(pdev); 1000 1087 1001 - if (pdev->dev.platform_data) { 1002 - r = rfbi_probe_pdata(pdev); 1003 - if (r) 1004 - goto err_probe; 1005 - } 1006 - 1007 1088 return 0; 1008 1089 1009 - err_probe: 1010 - rfbi_uninit_output(pdev); 1011 1090 err_runtime_get: 1012 1091 pm_runtime_disable(&pdev->dev); 1013 1092 return r; ··· 1007 1102 1008 1103 static int __exit omap_rfbihw_remove(struct platform_device *pdev) 1009 1104 { 1010 - dss_unregister_child_devices(&pdev->dev); 1011 - 1012 1105 rfbi_uninit_output(pdev); 1013 1106 1014 1107 pm_runtime_disable(&pdev->dev);
-26
include/video/omapdss.h
··· 250 250 int converted; 251 251 }; 252 252 253 - void omap_rfbi_write_command(const void *buf, u32 len); 254 - void omap_rfbi_read_data(void *buf, u32 len); 255 - void omap_rfbi_write_data(const void *buf, u32 len); 256 - void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, 257 - u16 x, u16 y, 258 - u16 w, u16 h); 259 - int omap_rfbi_enable_te(bool enable, unsigned line); 260 - int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, 261 - unsigned hs_pulse_time, unsigned vs_pulse_time, 262 - int hs_pol_inv, int vs_pol_inv, int extif_div); 263 - void rfbi_bus_lock(void); 264 - void rfbi_bus_unlock(void); 265 - 266 253 /* DSI */ 267 254 268 255 enum omap_dss_dsi_trans_mode { ··· 973 986 974 987 #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) 975 988 #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) 976 - 977 - int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); 978 - void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); 979 - int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), 980 - void *data); 981 - int omap_rfbi_configure(struct omap_dss_device *dssdev); 982 - void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h); 983 - void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, 984 - int pixel_size); 985 - void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, 986 - int data_lines); 987 - void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, 988 - struct rfbi_timings *timings); 989 989 990 990 int omapdss_compat_init(void); 991 991 void omapdss_compat_uninit(void);