summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-02-16 17:26:41 +0100
committerHans de Goede <hdegoede@redhat.com>2015-02-20 08:11:57 +0100
commit242e3d893d1311ea38abd25613076a29961d422e (patch)
tree6791d4ae57f678b0dafce3f3190ce332fe2f11b6 /drivers
parent1320112c8aa58345d71a5a46f3bf6a52589f1f2b (diff)
downloadblackbird-obmc-uboot-242e3d893d1311ea38abd25613076a29961d422e.tar.gz
blackbird-obmc-uboot-242e3d893d1311ea38abd25613076a29961d422e.zip
sunxi: video: Add support for LCD reset pin
On some boards there is a gpio to reset the LCD panel, add support for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sunxi_display.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
index dbda97e746..7f01401252 100644
--- a/drivers/video/sunxi_display.c
+++ b/drivers/video/sunxi_display.c
@@ -592,7 +592,7 @@ static void sunxi_lcdc_enable(void)
static void sunxi_lcdc_panel_enable(void)
{
- int pin;
+ int pin, reset_pin;
/*
* Start with backlight disabled to avoid the screen flashing to
@@ -610,6 +610,12 @@ static void sunxi_lcdc_panel_enable(void)
gpio_direction_output(pin, PWM_OFF);
}
+ reset_pin = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_RESET);
+ if (reset_pin != -1) {
+ gpio_request(reset_pin, "lcd_reset");
+ gpio_direction_output(reset_pin, 0); /* Assert reset */
+ }
+
/* Give the backlight some time to turn off and power up the panel. */
mdelay(40);
pin = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_POWER);
@@ -617,6 +623,9 @@ static void sunxi_lcdc_panel_enable(void)
gpio_request(pin, "lcd_power");
gpio_direction_output(pin, 1);
}
+
+ if (reset_pin != -1)
+ gpio_direction_output(reset_pin, 1); /* De-assert reset */
}
static void sunxi_lcdc_backlight_enable(void)
OpenPOWER on IntegriCloud