diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-3430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index a4d4664894e1..23b004afa3f8 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -108,53 +108,38 @@ 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 | ||
111 | static 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 | |||
116 | static void __init sdp3430_display_init(void) | 111 | static 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 | 126 | ||
127 | static 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 | |||
135 | static 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 | } | ||
140 | |||
141 | static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) | ||
142 | { | ||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev) | ||
147 | { | ||
148 | } | 127 | } |
149 | 128 | ||
129 | static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = { | ||
130 | .resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO, | ||
131 | .ini_gpio = -1, | ||
132 | .mo_gpio = -1, | ||
133 | .lr_gpio = -1, | ||
134 | .ud_gpio = -1, | ||
135 | }; | ||
150 | 136 | ||
151 | static struct omap_dss_device sdp3430_lcd_device = { | 137 | static struct omap_dss_device sdp3430_lcd_device = { |
152 | .name = "lcd", | 138 | .name = "lcd", |
153 | .driver_name = "sharp_ls_panel", | 139 | .driver_name = "sharp_ls_panel", |
154 | .type = OMAP_DISPLAY_TYPE_DPI, | 140 | .type = OMAP_DISPLAY_TYPE_DPI, |
155 | .phy.dpi.data_lines = 16, | 141 | .phy.dpi.data_lines = 16, |
156 | .platform_enable = sdp3430_panel_enable_lcd, | 142 | .data = &sdp3430_lcd_data, |
157 | .platform_disable = sdp3430_panel_disable_lcd, | ||
158 | }; | 143 | }; |
159 | 144 | ||
160 | static struct tfp410_platform_data dvi_panel = { | 145 | static struct tfp410_platform_data dvi_panel = { |
@@ -175,8 +160,6 @@ static struct omap_dss_device sdp3430_tv_device = { | |||
175 | .driver_name = "venc", | 160 | .driver_name = "venc", |
176 | .type = OMAP_DISPLAY_TYPE_VENC, | 161 | .type = OMAP_DISPLAY_TYPE_VENC, |
177 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | 162 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, |
178 | .platform_enable = sdp3430_panel_enable_tv, | ||
179 | .platform_disable = sdp3430_panel_disable_tv, | ||
180 | }; | 163 | }; |
181 | 164 | ||
182 | 165 | ||