[PATCH] gpio: rockchip: mark the GPIO controller as sleeping
Heiko Stübner
heiko at sntech.de
Sun Jan 25 05:23:20 PST 2026
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 at 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
More information about the linux-arm-kernel
mailing list