summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Kumar <ajaykumar.rs@samsung.com>2015-03-04 19:05:27 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2015-04-06 14:34:40 +0900
commit55e70929b83bc512721d08cb32a7523458d9122d (patch)
treed1a1fa580c2612fd81fb60f72707aa1693d9b978
parent9018efa7e227bc7041a98f5c5efebaa7ecfcfd0d (diff)
downloadblackbird-obmc-uboot-55e70929b83bc512721d08cb32a7523458d9122d.tar.gz
blackbird-obmc-uboot-55e70929b83bc512721d08cb32a7523458d9122d.zip
video: parade: configure SLP and RST GPIOs if specified in DT
Add support to configure EDP_RST GPIO and EDP_SLP GPIO, if provided in parade DT node. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--drivers/video/parade.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/parade.c b/drivers/video/parade.c
index 0f543f653c..ae5097160f 100644
--- a/drivers/video/parade.c
+++ b/drivers/video/parade.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <i2c.h>
#include <fdtdec.h>
+#include <asm/gpio.h>
/*
* Initialization of the chip is a process of writing certaing values into
@@ -180,6 +181,8 @@ static int parade_write_regs(int base_addr, const struct reg_data *table)
int parade_init(const void *blob)
{
+ struct gpio_desc rst_gpio;
+ struct gpio_desc slp_gpio;
int bus, old_bus;
int parent;
int node;
@@ -201,6 +204,14 @@ int parade_init(const void *blob)
return -1;
}
+ gpio_request_by_name_nodev(blob, node, "sleep-gpio", 0, &slp_gpio,
+ GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
+
+ mdelay(10);
+
+ gpio_request_by_name_nodev(blob, node, "reset-gpio", 0, &rst_gpio,
+ GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
+
bus = i2c_get_bus_num_fdt(parent);
old_bus = i2c_get_bus_num();
OpenPOWER on IntegriCloud