summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/sdi.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-20 15:48:49 +0400
committerArchit Taneja <archit@ti.com>2012-08-16 16:30:55 +0400
commit889b4fd7eed2d7c155dc642e15a714f87ab2842c (patch)
tree5b70f29adae68d236d6b0336c09c45e068d2e102 /drivers/video/omap2/dss/sdi.c
parentc6b393d4bc8bc076589bf03433728c1fc2a44d4c (diff)
downloadlinux-889b4fd7eed2d7c155dc642e15a714f87ab2842c.tar.xz
OMAPDSS: SDI: Maintain copy of data pairs in driver data
The SDI driver currently relies on the omap_dss_device struct to configure the number of data pairs as specified by the panel. This makes the SDI interface driver dependent on the omap_dss_device struct. Make the SDI driver data maintain it's own data lines field. A panel driver is expected to call omapdss_sdi_set_datapairs() before enabling the interface. Even though we configure the number of data pairs here, this function would be finally mapped to a generic interface op called set_data_lines. The datapairs argument type has been changed from u8 to int at some places to be in sync with the 'set_data_lines' ops of other interfaces. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/sdi.c')
-rw-r--r--drivers/video/omap2/dss/sdi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 6ec6614009ed..3bf1bfe29585 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -35,6 +35,7 @@ static struct {
struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings;
+ int datapairs;
} sdi;
static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
@@ -106,7 +107,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
sdi_config_lcd_manager(dssdev);
- dss_sdi_init(dssdev->phy.sdi.datapairs);
+ dss_sdi_init(sdi.datapairs);
+
r = dss_sdi_enable();
if (r)
goto err_sdi_enable;
@@ -164,6 +166,12 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_sdi_set_timings);
+void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
+{
+ sdi.datapairs = datapairs;
+}
+EXPORT_SYMBOL(omapdss_sdi_set_datapairs);
+
static int __init sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");