0045-pinctrl-lantiq-Fix-GPIO-Setup-of-GPIO-Port3.patch 989 B

12345678910111213141516171819202122232425262728
  1. From 57b588c950b7e04e0f22393ad439299ba4fda9c3 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Thu, 26 Nov 2015 11:00:09 +0100
  4. Subject: [PATCH] pinctrl/lantiq: Fix GPIO Setup of GPIO Port3
  5. Some special handling of GPIO Port 3 is needed because of
  6. some hardware thingofabob.
  7. Signed-off-by: John Crispin <blogic@openwrt.org>
  8. Signed-off-by: Martin Schiller <mschiller@tdt.de>
  9. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  10. ---
  11. drivers/pinctrl/pinctrl-xway.c | 4 ++++
  12. 1 file changed, 4 insertions(+)
  13. --- a/drivers/pinctrl/pinctrl-xway.c
  14. +++ b/drivers/pinctrl/pinctrl-xway.c
  15. @@ -1570,6 +1570,10 @@ static int xway_gpio_dir_out(struct gpio
  16. {
  17. struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev);
  18. + if (PORT(pin) == PORT3)
  19. + gpio_setbit(info->membase[0], GPIO3_OD, PORT_PIN(pin));
  20. + else
  21. + gpio_setbit(info->membase[0], GPIO_OD(pin), PORT_PIN(pin));
  22. gpio_setbit(info->membase[0], GPIO_DIR(pin), PORT_PIN(pin));
  23. xway_gpio_set(chip, pin, val);