From: "Heiko Stübner" <heiko@sntech.de>
To: Robin Murphy <robin.murphy@arm.com>,
Bartosz Golaszewski <brgl@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Linus Walleij <linusw@kernel.org>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Bartosz Golaszewski <brgl@kernel.org>
Subject: Re: [PATCH] gpio: rockchip: mark the GPIO controller as sleeping
Date: Sun, 25 Jan 2026 14:23:20 +0100 [thread overview]
Message-ID: <3204984.tdWV9SEqCh@diego> (raw)
In-Reply-To: <CAMRc=MfUawHpDgxj=fP2OF_-qg1O+P3oM_cSvGsbvAdLRB=+hw@mail.gmail.com>
Am Samstag, 24. Januar 2026, 22:07:12 Mitteleuropäische Normalzeit schrieb Bartosz Golaszewski:
> On Sat, 24 Jan 2026 00:45:25 +0100, Robin Murphy <robin.murphy@arm.com> said:
> > On 2026-01-23 9:52 pm, Heiko Stübner wrote:
[ snip to get to the core question at the bottom ]
> > diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> > index e44ef262beec..2fc67aeafdb3 100644
> > --- a/drivers/pinctrl/pinctrl-rockchip.c
> > +++ b/drivers/pinctrl/pinctrl-rockchip.c
> > @@ -3545,10 +3545,9 @@ static int rockchip_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
> > return 0;
> > }
> >
> > -static int rockchip_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
> > - struct pinctrl_gpio_range *range,
> > - unsigned offset,
> > - bool input)
> > +static int rockchip_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
> > + struct pinctrl_gpio_range *range,
> > + unsigned int offset)
> > {
> > struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
> > struct rockchip_pin_bank *bank;
> > @@ -3562,7 +3561,7 @@ static const struct pinmux_ops rockchip_pmx_ops = {
> > .get_function_name = rockchip_pmx_get_func_name,
> > .get_function_groups = rockchip_pmx_get_groups,
> > .set_mux = rockchip_pmx_set,
> > - .gpio_set_direction = rockchip_pmx_gpio_set_direction,
> > + .gpio_request_enable = rockchip_pmx_gpio_request_enable,
> > };
> >
> > /*
> >
>
> I'm not sure what's going on here. You don't really need to call
> pinctrl_gpio_direction_input/output()?
No we actually don't.
The current _set_direction function:
static int rockchip_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned offset,
bool input)
{
struct rockchip_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
struct rockchip_pin_bank *bank;
bank = pin_to_bank(info, offset);
return rockchip_set_mux(bank, offset - bank->pin_base, RK_FUNC_GPIO);
}
really only ever touches the pinmux and has nothing to do with setting
the direction, which is solely the task of the gpio-controller/-driver.
So moving that to the request callback would likely solve all our current
problems?
Heiko
next prev parent reply other threads:[~2026-01-25 13:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 9:00 [PATCH] gpio: rockchip: mark the GPIO controller as sleeping Bartosz Golaszewski
2026-01-06 17:10 ` Heiko Stuebner
2026-01-07 8:31 ` Bartosz Golaszewski
2026-01-09 23:55 ` Sebastian Reichel
2026-01-12 9:08 ` Bartosz Golaszewski
2026-01-23 13:27 ` Robin Murphy
2026-01-23 19:27 ` Bartosz Golaszewski
2026-01-23 20:57 ` Robin Murphy
2026-01-23 21:52 ` Heiko Stübner
2026-01-23 23:45 ` Robin Murphy
2026-01-24 21:07 ` Bartosz Golaszewski
2026-01-25 13:23 ` Heiko Stübner [this message]
2026-01-26 8:49 ` Bartosz Golaszewski
2026-01-23 20:02 ` Diederik de Haas
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=3204984.tdWV9SEqCh@diego \
--to=heiko@sntech.de \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=sebastian.reichel@collabora.com \
--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