diff options
author | John Crispin <john@openwrt.org> | 2015-02-11 10:17:55 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-02-11 10:17:55 +0000 |
commit | 408c9696264f8e25e4e4f6410e93d2edd06e59dd (patch) | |
tree | 1c9e8fbacb1508e8561c43f87389edf02cfb0955 /target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch | |
parent | f90d9d486a8842077e68e90bba2b276ac1336bab (diff) | |
download | upstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.tar.gz upstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.tar.bz2 upstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.zip |
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 44392
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch')
-rwxr-xr-x | target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch b/target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch new file mode 100755 index 0000000000..66f6f3bf21 --- /dev/null +++ b/target/linux/brcm2708/patches-3.18/0102-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch @@ -0,0 +1,33 @@ +From ce24753015125e11d87764dca9740fde33ccd455 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Wed, 4 Feb 2015 10:02:24 +0000 +Subject: [PATCH 102/114] pinctrl-bcm2835: bcm2835_gpio_direction_output must + set the value + +--- + drivers/pinctrl/pinctrl-bcm2835.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c +index 962e180..42a4fd5 100644 +--- a/drivers/pinctrl/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/pinctrl-bcm2835.c +@@ -355,7 +355,14 @@ static int bcm2835_gpio_get(struct gpio_chip *chip, unsigned offset) + static int bcm2835_gpio_direction_output(struct gpio_chip *chip, + unsigned offset, int value) + { +- return pinctrl_gpio_direction_output(chip->base + offset); ++ struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev); ++ int ret; ++ ++ ret = pinctrl_gpio_direction_output(chip->base + offset); ++ if (ret >= 0) ++ bcm2835_gpio_set_bit(pc, value ? GPSET0 : GPCLR0, offset); ++ ++ return ret; + } + + static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value) +-- +1.8.3.2 + |