@@ -112,10 +112,16 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */
};
+/* This board uses 2 gpios for the lcd reset line, so use
+ * omap_dss_device.reset_gpio for storing one and this variable
+ * for storing the other.
+ */
+static int lcd_enable_gpio = -EINVAL; /* will be replaced */
+
static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
{
- twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
- twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
+ if (gpio_is_valid(lcd_enable_gpio))
+ gpio_set_value_cansleep(lcd_enable_gpio, 1);
if (gpio_is_valid(dssdev->reset_gpio))
gpio_set_value_cansleep(dssdev->reset_gpio, 1);
@@ -124,6 +130,9 @@ static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
{
+ if (gpio_is_valid(lcd_enable_gpio))
+ gpio_set_value_cansleep(lcd_enable_gpio, 0);
+
if (gpio_is_valid(dssdev->reset_gpio))
gpio_set_value_cansleep(dssdev->reset_gpio, 0);
}
@@ -251,6 +260,12 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
/* Disable until needed */
gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
+ /* TWL4030_GPIO_MAX + 0 == ledA which is also "LCD_PWREN" */
+ lcd_enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
+ gpio_request(lcd_enable_gpio, "LCD_PWREN");
+ /* Disable until needed */
+ gpio_direction_output(lcd_enable_gpio, 0);
+
/* gpio + 7 is "DVI_PD" (out, active low) */
devkit8000_dvi_device.reset_gpio = gpio + 7;
gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown");