Patch "pinctrl/rockchip: support setting input-enable param" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pinctrl/rockchip: support setting input-enable param

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pinctrl-rockchip-support-setting-input-enable-param.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 42d90a1e5caf73138ddde42da5a9fe2b543f9a2c Mon Sep 17 00:00:00 2001
From: Caleb Connolly <kc@xxxxxxxxxxxxxxxx>
Date: Mon, 28 Mar 2022 01:50:03 +0100
Subject: pinctrl/rockchip: support setting input-enable param

From: Caleb Connolly <kc@xxxxxxxxxxxxxxxx>

commit 42d90a1e5caf73138ddde42da5a9fe2b543f9a2c upstream.

Handle the PIN_CONFIG_INPUT_ENABLE param for configuring GPIOs as input.

Signed-off-by: Caleb Connolly <kc@xxxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20220328005005.72492-3-kc@xxxxxxxxxxxxxxxx
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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
@@ -2141,7 +2141,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
@@ -2193,6 +2193,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)


Patches currently in stable-queue which might be from kc@xxxxxxxxxxxxxxxx are

queue-5.15/pinctrl-rockchip-support-setting-input-enable-param.patch
queue-5.15/pinctrl-rockchip-support-deferring-other-gpio-params.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux