diff options
author | Archit Taneja <archit@ti.com> | 2012-07-06 06:00:52 -0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 08:30:55 -0400 |
commit | c6b393d4bc8bc076589bf03433728c1fc2a44d4c (patch) | |
tree | bd7f95efe75d2117411e33bd7353921483e5e969 /drivers/video/omap2/dss/dpi.c | |
parent | 475989b763668f0794d6a8ee34a1ca0e784831e2 (diff) |
OMAPDSS: DPI: Maintain copy of number of data lines in driver data
The DPI driver currently relies on the omap_dss_device struct to configure the
number of data lines as specified by the panel. This makes the DPI interface
driver dependent on the omap_dss_device struct.
Make the DPI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_dpi_set_data_lines() before enabling the interface.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index d561a9198a8d..f260343e2451 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -43,6 +43,7 @@ static struct { | |||
43 | 43 | ||
44 | struct omap_video_timings timings; | 44 | struct omap_video_timings timings; |
45 | struct dss_lcd_mgr_config mgr_config; | 45 | struct dss_lcd_mgr_config mgr_config; |
46 | int data_lines; | ||
46 | } dpi; | 47 | } dpi; |
47 | 48 | ||
48 | static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) | 49 | static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) |
@@ -161,7 +162,7 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
161 | dpi.mgr_config.stallmode = false; | 162 | dpi.mgr_config.stallmode = false; |
162 | dpi.mgr_config.fifohandcheck = false; | 163 | dpi.mgr_config.fifohandcheck = false; |
163 | 164 | ||
164 | dpi.mgr_config.video_port_width = dssdev->phy.dpi.data_lines; | 165 | dpi.mgr_config.video_port_width = dpi.data_lines; |
165 | 166 | ||
166 | dpi.mgr_config.lcden_sig_polarity = 0; | 167 | dpi.mgr_config.lcden_sig_polarity = 0; |
167 | 168 | ||
@@ -347,6 +348,16 @@ int dpi_check_timings(struct omap_dss_device *dssdev, | |||
347 | } | 348 | } |
348 | EXPORT_SYMBOL(dpi_check_timings); | 349 | EXPORT_SYMBOL(dpi_check_timings); |
349 | 350 | ||
351 | void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) | ||
352 | { | ||
353 | mutex_lock(&dpi.lock); | ||
354 | |||
355 | dpi.data_lines = data_lines; | ||
356 | |||
357 | mutex_unlock(&dpi.lock); | ||
358 | } | ||
359 | EXPORT_SYMBOL(omapdss_dpi_set_data_lines); | ||
360 | |||
350 | static int __init dpi_init_display(struct omap_dss_device *dssdev) | 361 | static int __init dpi_init_display(struct omap_dss_device *dssdev) |
351 | { | 362 | { |
352 | DSSDBG("init_display\n"); | 363 | DSSDBG("init_display\n"); |