]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2022 10:41:51 +0000 (12:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2022 10:41:51 +0000 (12:41 +0200)
added patches:
pinctrl-rockchip-support-setting-input-enable-param.patch

queue-5.17/pinctrl-rockchip-support-setting-input-enable-param.patch [new file with mode: 0644]
queue-5.17/series

diff --git a/queue-5.17/pinctrl-rockchip-support-setting-input-enable-param.patch b/queue-5.17/pinctrl-rockchip-support-setting-input-enable-param.patch
new file mode 100644 (file)
index 0000000..31c95ec
--- /dev/null
@@ -0,0 +1,47 @@
+From 42d90a1e5caf73138ddde42da5a9fe2b543f9a2c Mon Sep 17 00:00:00 2001
+From: Caleb Connolly <kc@postmarketos.org>
+Date: Mon, 28 Mar 2022 01:50:03 +0100
+Subject: pinctrl/rockchip: support setting input-enable param
+
+From: Caleb Connolly <kc@postmarketos.org>
+
+commit 42d90a1e5caf73138ddde42da5a9fe2b543f9a2c upstream.
+
+Handle the PIN_CONFIG_INPUT_ENABLE param for configuring GPIOs as input.
+
+Signed-off-by: Caleb Connolly <kc@postmarketos.org>
+Link: https://lore.kernel.org/r/20220328005005.72492-3-kc@postmarketos.org
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pinctrl/pinctrl-rockchip.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/pinctrl/pinctrl-rockchip.c
++++ b/drivers/pinctrl/pinctrl-rockchip.c
+@@ -2144,7 +2144,7 @@ static int rockchip_pinconf_set(struct p
+               param = pinconf_to_config_param(configs[i]);
+               arg = pinconf_to_config_argument(configs[i]);
+-              if (param == (PIN_CONFIG_OUTPUT | PIN_CONFIG_INPUT_ENABLE)) {
++              if (param == PIN_CONFIG_OUTPUT || param == PIN_CONFIG_INPUT_ENABLE) {
+                       /*
+                        * Check for gpio driver not being probed yet.
+                        * The lock makes sure that either gpio-probe has completed
+@@ -2196,6 +2196,16 @@ static int rockchip_pinconf_set(struct p
+                       if (rc)
+                               return rc;
+                       break;
++              case PIN_CONFIG_INPUT_ENABLE:
++                      rc = rockchip_set_mux(bank, pin - bank->pin_base,
++                                            RK_FUNC_GPIO);
++                      if (rc != RK_FUNC_GPIO)
++                              return -EINVAL;
++
++                      rc = gpio->direction_input(gpio, pin - bank->pin_base);
++                      if (rc)
++                              return rc;
++                      break;
+               case PIN_CONFIG_DRIVE_STRENGTH:
+                       /* rk3288 is the first with per-pin drive-strength */
+                       if (!info->ctrl->drv_calc_reg)
index 151e79df89ca6d599d2ebf675e6592d12a492487..11b4b8bb6ed92306089edebb3d33ab4c91a2a76c 100644 (file)
@@ -770,3 +770,4 @@ md-don-t-set-mddev-private-to-null-in-raid0-pers-free.patch
 md-fix-double-free-of-io_acct_set-bioset.patch
 md-bcache-check-the-return-value-of-kzalloc-in-detached_dev_do_request.patch
 tty-n_gsm-fix-packet-data-hex-dump-output.patch
+pinctrl-rockchip-support-setting-input-enable-param.patch