summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorMatheus Castello <matheus@castello.eng.br>2018-04-30 20:42:14 -0400
committerLinus Walleij <linus.walleij@linaro.org>2018-05-16 14:01:37 +0200
commit90b60552a29b9517b56856b849f229b3e915e6ac (patch)
tree490abc779614a450e9d4c30557cea8001ab599aa /drivers/pinctrl
parent0de704955ee44738e88b9cc08546ea10354037ed (diff)
downloadlinux-0-day-90b60552a29b9517b56856b849f229b3e915e6ac.tar.gz
linux-0-day-90b60552a29b9517b56856b849f229b3e915e6ac.tar.xz
pinctrl: bcm2835: Add support for output-low output-high properties
Properties to set initial value of pin output buffer. This can be useful for configure hardware in overlay files, and in early boot for checking it states in QA sanity tests. Signed-off-by: Matheus Castello <matheus@castello.eng.br> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/bcm/pinctrl-bcm2835.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index a0b1f5f9b8aa9..136ccaf53df8d 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -965,6 +965,11 @@ static int bcm2835_pinconf_set(struct pinctrl_dev *pctldev,
bcm2835_pull_config_set(pc, pin, BCM2835_PUD_UP);
break;
+ /* Set output-high or output-low */
+ case PIN_CONFIG_OUTPUT:
+ bcm2835_gpio_set_bit(pc, arg ? GPSET0 : GPCLR0, pin);
+ break;
+
default:
return -EINVAL;