diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-08 11:59:37 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-06-08 21:23:21 +0200 |
commit | 3fc661a98c8046a27dcf45a63049ee6605ebd364 (patch) | |
tree | 0468b8f3c8d4aa13ecce333ab3ad84146263cbc4 /target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch | |
parent | c17f02d2f272c6d74b20c2df050437f761d013a6 (diff) | |
download | mtk-20170518-3fc661a98c8046a27dcf45a63049ee6605ebd364.zip mtk-20170518-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.gz mtk-20170518-3fc661a98c8046a27dcf45a63049ee6605ebd364.tar.bz2 |
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y
Also alphabetically order sound-soc kernel packages.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch b/target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch new file mode 100644 index 0000000..cf1c106 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0321-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch @@ -0,0 +1,40 @@ +From 2e4f06a9b7276db1e2dafe33564ad5115f63a210 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Fri, 6 May 2016 12:32:47 +0100 +Subject: [PATCH 321/381] pinctrl-bcm2835: Return pins to inputs when freed + +When dynamically unloading overlays, it is important that freed pins are +restored to being inputs to prevent functions from being enabled in +multiple places at once. + +Signed-off-by: Phil Elwell <phil@raspberrypi.org> +--- + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -831,6 +831,15 @@ static const struct pinctrl_ops bcm2835_ + .dt_free_map = bcm2835_pctl_dt_free_map, + }; + ++static void bcm2835_pmx_free(struct pinctrl_dev *pctldev, ++ unsigned offset) ++{ ++ struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); ++ ++ /* disable by setting to GPIO_IN */ ++ bcm2835_pinctrl_fsel_set(pc, offset, BCM2835_FSEL_GPIO_IN); ++} ++ + static int bcm2835_pmx_get_functions_count(struct pinctrl_dev *pctldev) + { + return BCM2835_FSEL_COUNT; +@@ -890,6 +899,7 @@ static int bcm2835_pmx_gpio_set_directio + } + + static const struct pinmux_ops bcm2835_pmx_ops = { ++ .free = bcm2835_pmx_free, + .get_functions_count = bcm2835_pmx_get_functions_count, + .get_function_name = bcm2835_pmx_get_function_name, + .get_function_groups = bcm2835_pmx_get_function_groups, |