diff options
author | Archit Taneja <archit@ti.com> | 2012-08-13 11:58:15 +0200 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 14:30:54 +0200 |
commit | 475989b763668f0794d6a8ee34a1ca0e784831e2 (patch) | |
tree | 29034bc47a822f28326b62b3e6523a931c6294f1 /drivers/video/omap2/dss/rfbi.c | |
parent | OMAPDSS: RFBI: Maintain copy of pixel size in driver data (diff) | |
download | linux-475989b763668f0794d6a8ee34a1ca0e784831e2.tar.xz linux-475989b763668f0794d6a8ee34a1ca0e784831e2.zip |
OMAPDSS: RFBI: Maintain copy of number of data lines in driver data
The RFBI driver currently relies on the omap_dss_device struct to configure the
number of data lines as specified by the panel. This makes the RFBI interface
driver dependent on the omap_dss_device struct.
Make the RFBI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_rfbi_set_data_lines() to configure the pixel format
before enabling the interface or calling omap_rfbi_configure().
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 98c65223789e..698d5b92f8e2 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -114,6 +114,7 @@ static struct { struct omap_video_timings timings; int pixel_size; + int data_lines; } rfbi; static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val) @@ -765,10 +766,10 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) return 0; } -int omap_rfbi_configure(struct omap_dss_device *dssdev, int data_lines) +int omap_rfbi_configure(struct omap_dss_device *dssdev) { return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, - data_lines); + rfbi.data_lines); } EXPORT_SYMBOL(omap_rfbi_configure); @@ -792,6 +793,12 @@ void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) } EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); +void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) +{ + rfbi.data_lines = data_lines; +} +EXPORT_SYMBOL(omapdss_rfbi_set_data_lines); + static void rfbi_dump_regs(struct seq_file *s) { #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r)) @@ -898,7 +905,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, - dssdev->phy.rfbi.data_lines); + rfbi.data_lines); rfbi_set_timings(dssdev->phy.rfbi.channel, &dssdev->ctrl.rfbi_timings); |