linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthijs Kooijman <matthijs@stdin.nl>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org, linux-gpio@vger.kernel.org,
	Matthijs Kooijman <matthijs@stdin.nl>,
	stable@vger.kernel.org
Subject: [PATCH 1/2] gpio: rockchip: Call pinctrl for gpio config
Date: Fri,  5 Dec 2025 21:06:52 +0100	[thread overview]
Message-ID: <20251205201254.2865179-4-matthijs@stdin.nl> (raw)
In-Reply-To: <20251205201254.2865179-2-matthijs@stdin.nl>

Pinctrl is responsible for bias settings and possibly other pin config,
so call gpiochip_generic_config to apply such config values. This might
also include settings that pinctrl does not support, but then it can
return ENOTSUPP as appropriate.

This makes sure any bias and other pin config set by userspace (via
gpiod) actually takes effect.


Cc: stable@vger.kernel.org
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>

---
 drivers/gpio/gpio-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 47174eb3ba76f..106f7f734b4ff 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -303,7 +303,7 @@ static int rockchip_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
 		 */
 		return -ENOTSUPP;
 	default:
-		return -ENOTSUPP;
+		return gpiochip_generic_config(gc, offset, config);
 	}
 }
 
-- 
2.48.1


  reply	other threads:[~2025-12-05 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 20:06 rockchip: Make gpiod pin control work and add gpio-ranges Matthijs Kooijman
2025-12-05 20:06 ` Matthijs Kooijman [this message]
2025-12-05 20:06 ` [PATCH 2/2] arm64: dts: rockchip: rk3308: Add gpio-ranges properties Matthijs Kooijman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251205201254.2865179-4-matthijs@stdin.nl \
    --to=matthijs@stdin.nl \
    --cc=heiko@sntech.de \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).