summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-01-09 17:02:28 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 11:59:32 +0300
commita264d10ff45c688293d9112fddd8d29c819e0853 (patch)
tree850a9dac5d81c8dfdd8bb4bcdc5247408ea59d9e /drivers/video/fbdev
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
downloadlinux-a264d10ff45c688293d9112fddd8d29c819e0853.tar.xz
gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/amba-clcd-nomadik.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/video/fbdev/amba-clcd-nomadik.c b/drivers/video/fbdev/amba-clcd-nomadik.c
index 0c06fcaaa6e8..2e800d70b0e5 100644
--- a/drivers/video/fbdev/amba-clcd-nomadik.c
+++ b/drivers/video/fbdev/amba-clcd-nomadik.c
@@ -184,32 +184,27 @@ static void tpg110_init(struct device *dev, struct device_node *np,
{
dev_info(dev, "TPG110 display init\n");
- grestb = devm_get_gpiod_from_child(dev, "grestb", &np->fwnode);
+ /* This asserts the GRESTB signal, putting the display into reset */
+ grestb = devm_get_gpiod_from_child(dev, "grestb", &np->fwnode, GPIOD_OUT_HIGH);
if (IS_ERR(grestb)) {
dev_err(dev, "no GRESTB GPIO\n");
return;
}
- /* This asserts the GRESTB signal, putting the display into reset */
- gpiod_direction_output(grestb, 1);
-
- scen = devm_get_gpiod_from_child(dev, "scen", &np->fwnode);
+ scen = devm_get_gpiod_from_child(dev, "scen", &np->fwnode, GPIOD_OUT_LOW);
if (IS_ERR(scen)) {
dev_err(dev, "no SCEN GPIO\n");
return;
}
- gpiod_direction_output(scen, 0);
- scl = devm_get_gpiod_from_child(dev, "scl", &np->fwnode);
+ scl = devm_get_gpiod_from_child(dev, "scl", &np->fwnode, GPIOD_OUT_LOW);
if (IS_ERR(scl)) {
dev_err(dev, "no SCL GPIO\n");
return;
}
- gpiod_direction_output(scl, 0);
- sda = devm_get_gpiod_from_child(dev, "sda", &np->fwnode);
+ sda = devm_get_gpiod_from_child(dev, "sda", &np->fwnode, GPIOD_OUT_LOW);
if (IS_ERR(sda)) {
dev_err(dev, "no SDA GPIO\n");
return;
}
- gpiod_direction_output(sda, 0);
board->enable = tpg110_enable;
board->disable = tpg110_disable;
}