]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.44/pinctrl-meson-fix-gpio-request-disabling-other-modes.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.44 / pinctrl-meson-fix-gpio-request-disabling-other-modes.patch
CommitLineData
7e0d956d
GKH
1From f24d311f92b516a8aadef5056424ccabb4068e7b Mon Sep 17 00:00:00 2001
2From: Neil Armstrong <narmstrong@baylibre.com>
3Date: Tue, 6 Dec 2016 15:08:16 +0100
4Subject: pinctrl: meson: fix gpio request disabling other modes
5
6From: Neil Armstrong <narmstrong@baylibre.com>
7
8commit f24d311f92b516a8aadef5056424ccabb4068e7b upstream.
9
10The pinctrl_gpio_request is called with the "full" gpio number, already
11containing the base, then meson_pmx_request_gpio is then called with the
12final pin number.
13Remove the base addition when calling meson_pmx_disable_other_groups.
14
15Fixes: 6ac730951104 ("pinctrl: add driver for Amlogic Meson SoCs")
16CC: Beniamino Galvani <b.galvani@gmail.com>
17Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
18Acked-by: Kevin Hilman <khilman@baylibre.com>
19Acked-by: Beniamino Galvani <b.galvani@gmail.com>
20Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 drivers/pinctrl/meson/pinctrl-meson.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27--- a/drivers/pinctrl/meson/pinctrl-meson.c
28+++ b/drivers/pinctrl/meson/pinctrl-meson.c
29@@ -246,7 +246,7 @@ static int meson_pmx_request_gpio(struct
30 {
31 struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev);
32
33- meson_pmx_disable_other_groups(pc, range->pin_base + offset, -1);
34+ meson_pmx_disable_other_groups(pc, offset, -1);
35
36 return 0;
37 }