aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-devkit8000.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-09-14 08:19:02 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-04 04:50:27 -0400
commit9272d8bd4a56fcee4da827418b1dcf8b261cd380 (patch)
tree9f47aa5ee3e83f1a4a48a345802e54c3227af5a2 /arch/arm/mach-omap2/board-devkit8000.c
parent3b4ece75b9e9482a81467173c16c29d044c2c10b (diff)
arm: omap: board-devkit8000: use generic dpi panel's gpio handling
The devkit8000 board file currently requests gpios required to configure the innolux DPI panel, and provides platform_enable/disable callbacks to configure them. These tasks have been moved to the generic dpi panel driver itself and should be removed from the board files. Remove the gpio request and the platform callbacks from the board file. Configure the gpio information in generic dpi panel's platform data so that it's passed to the panel driver. Signed-off-by: Archit Taneja <archit@ti.com> Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-devkit8000.c')
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12d2126a2382..34944cfdfbd9 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -103,19 +103,6 @@ static struct omap2_hsmmc_info mmc[] = {
103 {} /* Terminator */ 103 {} /* Terminator */
104}; 104};
105 105
106static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
107{
108 if (gpio_is_valid(dssdev->reset_gpio))
109 gpio_set_value_cansleep(dssdev->reset_gpio, 1);
110 return 0;
111}
112
113static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
114{
115 if (gpio_is_valid(dssdev->reset_gpio))
116 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
117}
118
119static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { 106static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
120 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 107 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
121}; 108};
@@ -127,8 +114,7 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
127 114
128static struct panel_generic_dpi_data lcd_panel = { 115static struct panel_generic_dpi_data lcd_panel = {
129 .name = "innolux_at070tn83", 116 .name = "innolux_at070tn83",
130 .platform_enable = devkit8000_panel_enable_lcd, 117 /* gpios filled in code */
131 .platform_disable = devkit8000_panel_disable_lcd,
132}; 118};
133 119
134static struct omap_dss_device devkit8000_lcd_device = { 120static struct omap_dss_device devkit8000_lcd_device = {
@@ -210,8 +196,6 @@ static struct gpio_led gpio_leds[];
210static int devkit8000_twl_gpio_setup(struct device *dev, 196static int devkit8000_twl_gpio_setup(struct device *dev,
211 unsigned gpio, unsigned ngpio) 197 unsigned gpio, unsigned ngpio)
212{ 198{
213 int ret;
214
215 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 199 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
216 mmc[0].gpio_cd = gpio + 0; 200 mmc[0].gpio_cd = gpio + 0;
217 omap_hsmmc_late_init(mmc); 201 omap_hsmmc_late_init(mmc);
@@ -220,13 +204,8 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
220 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 204 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
221 205
222 /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ 206 /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
223 devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0; 207 lcd_panel.num_gpios = 1;
224 ret = gpio_request_one(devkit8000_lcd_device.reset_gpio, 208 lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
225 GPIOF_OUT_INIT_LOW, "LCD_PWREN");
226 if (ret < 0) {
227 devkit8000_lcd_device.reset_gpio = -EINVAL;
228 printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n");
229 }
230 209
231 /* gpio + 7 is "DVI_PD" (out, active low) */ 210 /* gpio + 7 is "DVI_PD" (out, active low) */
232 dvi_panel.power_down_gpio = gpio + 7; 211 dvi_panel.power_down_gpio = gpio + 7;