aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-02-12 04:38:09 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-04 04:50:52 -0400
commita05f92b70205df5927d767e9e0afecd2e5fde6d2 (patch)
tree66d90d8b92b0d846f8e3202572392a74748490ca
parentfde382541d55000ffc39587d5bff4f71fde8db07 (diff)
arm: omap: board-sdp3430: use sharp panel's gpio handling
The omap3430sdp board file currently requests gpios required by the sharp_ls dpi panel, and provides platform_enable/disable callbacks to configure them. These tasks have been moved to the sharp_ls panel driver itself and shouldn't be done in the board files. Remove the gpio requests and the platform callbacks from the board file. Add the gpio information to panel_sharp_ls037v7dw01_data so that it's passed to the panel driver. Out of sharp panel's configurable pins, all apart from resb_gpio are managed by a CPLD on the display and set to a default value. Only the configurable pin is passed to platform data. The backlight GPIO doesn't go directly to the sharp panel, it is used to set up a voltage supply which goes to the LED+ pin of the panel, hence it isn't passed to panel as platform data, and configured in the board file itself. The backlight used to previously toggle through the platform_enable/disable callbacks, but now it is always on. This needs to be revisited. Signed-off-by: Archit Taneja <archit@ti.com> Cc: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 2612eeaa5889..66cfcca0a707 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -108,34 +108,22 @@ static struct twl4030_keypad_data sdp3430_kp_data = {
108#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8 108#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8
109#define SDP3430_LCD_PANEL_ENABLE_GPIO 5 109#define SDP3430_LCD_PANEL_ENABLE_GPIO 5
110 110
111static struct gpio sdp3430_dss_gpios[] __initdata = {
112 {SDP3430_LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "LCD reset" },
113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
114};
115
116static void __init sdp3430_display_init(void) 111static void __init sdp3430_display_init(void)
117{ 112{
118 int r; 113 int r;
119 114
120 r = gpio_request_array(sdp3430_dss_gpios, 115 /*
121 ARRAY_SIZE(sdp3430_dss_gpios)); 116 * the backlight GPIO doesn't directly go to the panel, it enables
117 * an internal circuit on 3430sdp to create the signal V_BKL_28V,
118 * this is connected to LED+ pin of the sharp panel. This GPIO
119 * is left enabled in the board file, and not passed to the panel
120 * as platform_data.
121 */
122 r = gpio_request_one(SDP3430_LCD_PANEL_BACKLIGHT_GPIO,
123 GPIOF_OUT_INIT_HIGH, "LCD Backlight");
122 if (r) 124 if (r)
123 printk(KERN_ERR "failed to get LCD control GPIOs\n"); 125 pr_err("failed to get LCD Backlight GPIO\n");
124
125}
126
127static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
128{
129 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
130 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
131
132 return 0;
133}
134 126
135static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
136{
137 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
138 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
139} 127}
140 128
141static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) 129static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
@@ -147,14 +135,20 @@ static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev)
147{ 135{
148} 136}
149 137
138static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = {
139 .resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO,
140 .ini_gpio = -1,
141 .mo_gpio = -1,
142 .lr_gpio = -1,
143 .ud_gpio = -1,
144};
150 145
151static struct omap_dss_device sdp3430_lcd_device = { 146static struct omap_dss_device sdp3430_lcd_device = {
152 .name = "lcd", 147 .name = "lcd",
153 .driver_name = "sharp_ls_panel", 148 .driver_name = "sharp_ls_panel",
154 .type = OMAP_DISPLAY_TYPE_DPI, 149 .type = OMAP_DISPLAY_TYPE_DPI,
155 .phy.dpi.data_lines = 16, 150 .phy.dpi.data_lines = 16,
156 .platform_enable = sdp3430_panel_enable_lcd, 151 .data = &sdp3430_lcd_data,
157 .platform_disable = sdp3430_panel_disable_lcd,
158}; 152};
159 153
160static struct tfp410_platform_data dvi_panel = { 154static struct tfp410_platform_data dvi_panel = {