diff options
author | John Crispin <john@openwrt.org> | 2015-07-17 12:48:39 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-07-17 12:48:39 +0000 |
commit | 208ab54e3e9516dd9fcf1ce197950044e0bebd90 (patch) | |
tree | 425580d694235f06661dd2d6763925a1f69279c6 /target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch | |
parent | 03b56c9350057ee77cfe2b8bb8f8d7146917fb79 (diff) | |
download | mtk-20170518-208ab54e3e9516dd9fcf1ce197950044e0bebd90.zip mtk-20170518-208ab54e3e9516dd9fcf1ce197950044e0bebd90.tar.gz mtk-20170518-208ab54e3e9516dd9fcf1ce197950044e0bebd90.tar.bz2 |
brcm2708: add linux 4.1 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 46399
Diffstat (limited to 'target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch b/target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch new file mode 100644 index 0000000..08e2634 --- /dev/null +++ b/target/linux/brcm2708/patches-4.1/0057-pinctrl-bcm2835-bcm2835_gpio_direction_output-must-s.patch @@ -0,0 +1,28 @@ +From 0bb455e4eca847aa74560f58bfd7daa13e9fb496 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Wed, 4 Feb 2015 10:02:24 +0000 +Subject: [PATCH 057/121] pinctrl-bcm2835: bcm2835_gpio_direction_output must + set the value + +--- + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -355,7 +355,14 @@ static int bcm2835_gpio_get(struct gpio_ + 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) |