diff mbox

[RFC] Devkit8000: Use generic panel driver instead of new driver for every panel

Message ID 1271405541-7048-1-git-send-email-kanru@0xlab.org (mailing list archive)
State New, archived
Headers show

Commit Message

Kan-Ru Chen April 16, 2010, 8:12 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 5bfc13b..4f52dfd 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -172,8 +172,9 @@  static struct regulator_consumer_supply devkit8000_vsim_supply = {
 
 static struct omap_dss_device devkit8000_lcd_device = {
 	.name                   = "lcd",
-	.driver_name            = "innolux_at_panel",
+	.driver_name            = "generic_panel",
 	.type                   = OMAP_DISPLAY_TYPE_DPI,
+	.panel.config           = OMAP_DSS_LCD_TFT|OMAP_DSS_LCD_IVS|OMAP_DSS_LCD_IHS,
 	.phy.dpi.data_lines     = 24,
 	.platform_enable        = devkit8000_panel_enable_lcd,
 	.platform_disable       = devkit8000_panel_disable_lcd,
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index b895aae..89bb3e5 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -273,6 +273,18 @@  static const struct fb_videomode modedb[] = {
        /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
        NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5,
        0, FB_VMODE_INTERLACED
+    }, {
+       /* 480x272 @ 60 Hz, Devkit8000 4.3 inch LCD */
+       NULL, 60, 480, 272, 111000, 2, 2, 2, 2, 41, 10,
+       0, FB_VMODE_NONINTERLACED
+    }, {
+       /* 640x480 @ 60 Hz, Devkit8000 5.6 inch LCD */
+       NULL, 60, 640, 480, 39682, 16, 143, 32, 12, 1, 1,
+       0, FB_VMODE_NONINTERLACED
+    }, {
+       /* 800x480 @ 60 Hz, Devkit8000 7 inch LCD */
+       NULL, 60, 800, 480, 24855, 210, 45, 132, 22, 1, 1,
+       0, FB_VMODE_NONINTERLACED
     },
 };
 
diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c
index 300eff5..b0a5599 100644
--- a/drivers/video/omap2/displays/panel-generic.c
+++ b/drivers/video/omap2/displays/panel-generic.c
@@ -66,7 +66,8 @@  static void generic_panel_power_off(struct omap_dss_device *dssdev)
 
 static int generic_panel_probe(struct omap_dss_device *dssdev)
 {
-	dssdev->panel.config = OMAP_DSS_LCD_TFT;
+	if (dssdev->panel.config == 0)
+		dssdev->panel.config = OMAP_DSS_LCD_TFT;
 	dssdev->panel.timings = generic_panel_timings;
 
 	return 0;