From: Tomi Valkeinen Date: Fri, 31 May 2013 13:04:14 +0000 (+0300) Subject: OMAPDSS: RFBI: remove code related to old panel model X-Git-Tag: firefly_0821_release~176^2~5426^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c1e4535d431927a440e658dcafae58e309f4add7;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Archit Taneja --- diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index fdfe6e6f25df..c8a81a2b879c 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -151,19 +151,17 @@ static void rfbi_runtime_put(void) WARN_ON(r < 0 && r != -ENOSYS); } -void rfbi_bus_lock(void) +static void rfbi_bus_lock(void) { down(&rfbi.bus_lock); } -EXPORT_SYMBOL(rfbi_bus_lock); -void rfbi_bus_unlock(void) +static void rfbi_bus_unlock(void) { up(&rfbi.bus_lock); } -EXPORT_SYMBOL(rfbi_bus_unlock); -void omap_rfbi_write_command(const void *buf, u32 len) +static void rfbi_write_command(const void *buf, u32 len) { switch (rfbi.parallelmode) { case OMAP_DSS_RFBI_PARALLELMODE_8: @@ -189,9 +187,8 @@ void omap_rfbi_write_command(const void *buf, u32 len) BUG(); } } -EXPORT_SYMBOL(omap_rfbi_write_command); -void omap_rfbi_read_data(void *buf, u32 len) +static void rfbi_read_data(void *buf, u32 len) { switch (rfbi.parallelmode) { case OMAP_DSS_RFBI_PARALLELMODE_8: @@ -221,9 +218,8 @@ void omap_rfbi_read_data(void *buf, u32 len) BUG(); } } -EXPORT_SYMBOL(omap_rfbi_read_data); -void omap_rfbi_write_data(const void *buf, u32 len) +static void rfbi_write_data(const void *buf, u32 len) { switch (rfbi.parallelmode) { case OMAP_DSS_RFBI_PARALLELMODE_8: @@ -250,9 +246,8 @@ void omap_rfbi_write_data(const void *buf, u32 len) } } -EXPORT_SYMBOL(omap_rfbi_write_data); -void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, +static void rfbi_write_pixels(const void __iomem *buf, int scr_width, u16 x, u16 y, u16 w, u16 h) { @@ -305,7 +300,6 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, BUG(); } } -EXPORT_SYMBOL(omap_rfbi_write_pixels); static int rfbi_transfer_area(struct omap_dss_device *dssdev, void (*callback)(void *data), void *data) @@ -574,7 +568,7 @@ static int rfbi_convert_timings(struct rfbi_timings *t) } /* xxx FIX module selection missing */ -int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, +static int rfbi_setup_te(enum omap_rfbi_te_mode mode, unsigned hs_pulse_time, unsigned vs_pulse_time, int hs_pol_inv, int vs_pol_inv, int extif_div) { @@ -613,10 +607,9 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, return 0; } -EXPORT_SYMBOL(omap_rfbi_setup_te); /* xxx FIX module selection missing */ -int omap_rfbi_enable_te(bool enable, unsigned line) +static int rfbi_enable_te(bool enable, unsigned line) { u32 l; @@ -636,9 +629,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line) return 0; } -EXPORT_SYMBOL(omap_rfbi_enable_te); -static int rfbi_configure(int rfbi_module, int bpp, int lines) +static int rfbi_configure_bus(int rfbi_module, int bpp, int lines) { u32 l; int cycle1 = 0, cycle2 = 0, cycle3 = 0; @@ -770,45 +762,39 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) return 0; } -int omap_rfbi_configure(struct omap_dss_device *dssdev) +static int rfbi_configure(struct omap_dss_device *dssdev) { - return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, + return rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, rfbi.data_lines); } -EXPORT_SYMBOL(omap_rfbi_configure); -int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), +static int rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), void *data) { return rfbi_transfer_area(dssdev, callback, data); } -EXPORT_SYMBOL(omap_rfbi_update); -void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) +static void rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) { rfbi.timings.x_res = w; rfbi.timings.y_res = h; } -EXPORT_SYMBOL(omapdss_rfbi_set_size); -void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) +static void rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) { rfbi.pixel_size = pixel_size; } -EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); -void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) +static void rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) { rfbi.data_lines = data_lines; } -EXPORT_SYMBOL(omapdss_rfbi_set_data_lines); -void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, +static void rfbi_set_interface_timings(struct omap_dss_device *dssdev, struct rfbi_timings *timings) { rfbi.intf_timings = *timings; } -EXPORT_SYMBOL(omapdss_rfbi_set_interface_timings); static void rfbi_dump_regs(struct seq_file *s) { @@ -888,7 +874,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) dss_mgr_set_timings(mgr, &rfbi.timings); } -int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) +static int rfbi_display_enable(struct omap_dss_device *dssdev) { struct omap_dss_device *out = &rfbi.output; int r; @@ -911,7 +897,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) rfbi_config_lcd_manager(dssdev); - rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, + rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size, rfbi.data_lines); rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings); @@ -921,9 +907,8 @@ err1: rfbi_runtime_put(); return r; } -EXPORT_SYMBOL(omapdss_rfbi_display_enable); -void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) +static void rfbi_display_disable(struct omap_dss_device *dssdev) { struct omap_dss_device *out = &rfbi.output; @@ -932,7 +917,6 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev) rfbi_runtime_put(); } -EXPORT_SYMBOL(omapdss_rfbi_display_disable); static int rfbi_init_display(struct omap_dss_device *dssdev) { @@ -940,77 +924,6 @@ static int rfbi_init_display(struct omap_dss_device *dssdev) return 0; } -static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev) -{ - struct omap_dss_board_info *pdata = pdev->dev.platform_data; - const char *def_disp_name = omapdss_get_default_display_name(); - struct omap_dss_device *def_dssdev; - int i; - - def_dssdev = NULL; - - for (i = 0; i < pdata->num_devices; ++i) { - struct omap_dss_device *dssdev = pdata->devices[i]; - - if (dssdev->type != OMAP_DISPLAY_TYPE_DBI) - continue; - - if (def_dssdev == NULL) - def_dssdev = dssdev; - - if (def_disp_name != NULL && - strcmp(dssdev->name, def_disp_name) == 0) { - def_dssdev = dssdev; - break; - } - } - - return def_dssdev; -} - -static int rfbi_probe_pdata(struct platform_device *rfbidev) -{ - struct omap_dss_device *plat_dssdev; - struct omap_dss_device *dssdev; - int r; - - plat_dssdev = rfbi_find_dssdev(rfbidev); - - if (!plat_dssdev) - return 0; - - dssdev = dss_alloc_and_init_device(&rfbidev->dev); - if (!dssdev) - return -ENOMEM; - - dss_copy_device_pdata(dssdev, plat_dssdev); - - r = rfbi_init_display(dssdev); - if (r) { - DSSERR("device %s init failed: %d\n", dssdev->name, r); - dss_put_device(dssdev); - return r; - } - - r = omapdss_output_set_device(&rfbi.output, dssdev); - if (r) { - DSSERR("failed to connect output to new device: %s\n", - dssdev->name); - dss_put_device(dssdev); - return r; - } - - r = dss_add_device(dssdev); - if (r) { - DSSERR("device %s register failed: %d\n", dssdev->name, r); - omapdss_output_unset_device(&rfbi.output); - dss_put_device(dssdev); - return r; - } - - return 0; -} - static void rfbi_init_output(struct platform_device *pdev) { struct omap_dss_device *out = &rfbi.output; @@ -1085,16 +998,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev) rfbi_init_output(pdev); - if (pdev->dev.platform_data) { - r = rfbi_probe_pdata(pdev); - if (r) - goto err_probe; - } - return 0; -err_probe: - rfbi_uninit_output(pdev); err_runtime_get: pm_runtime_disable(&pdev->dev); return r; @@ -1102,8 +1007,6 @@ err_runtime_get: static int __exit omap_rfbihw_remove(struct platform_device *pdev) { - dss_unregister_child_devices(&pdev->dev); - rfbi_uninit_output(pdev); pm_runtime_disable(&pdev->dev); diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 33958045a406..ca04b56c8f9d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -250,19 +250,6 @@ struct rfbi_timings { int converted; }; -void omap_rfbi_write_command(const void *buf, u32 len); -void omap_rfbi_read_data(void *buf, u32 len); -void omap_rfbi_write_data(const void *buf, u32 len); -void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, - u16 x, u16 y, - u16 w, u16 h); -int omap_rfbi_enable_te(bool enable, unsigned line); -int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, - unsigned hs_pulse_time, unsigned vs_pulse_time, - int hs_pol_inv, int vs_pol_inv, int extif_div); -void rfbi_bus_lock(void); -void rfbi_bus_unlock(void); - /* DSI */ enum omap_dss_dsi_trans_mode { @@ -987,19 +974,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) -int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); -void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); -int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *), - void *data); -int omap_rfbi_configure(struct omap_dss_device *dssdev); -void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h); -void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, - int pixel_size); -void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, - int data_lines); -void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev, - struct rfbi_timings *timings); - int omapdss_compat_init(void); void omapdss_compat_uninit(void);