lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=MdNkjp6gZJcdTMoFtvQo8kW4damvNFA3+MhVbXhFU7D9w@mail.gmail.com>
Date: Mon, 26 Jan 2026 09:49:15 +0100
From: Bartosz Golaszewski <brgl@...nel.org>
To: Heiko Stübner <heiko@...ech.de>
Cc: Robin Murphy <robin.murphy@....com>, 
	Sebastian Reichel <sebastian.reichel@...labora.com>, 
	Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>, Linus Walleij <linusw@...nel.org>, 
	linux-gpio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	stable@...r.kernel.org, Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH] gpio: rockchip: mark the GPIO controller as sleeping

On Sun, Jan 25, 2026 at 2:23 PM Heiko Stübner <heiko@...ech.de> wrote:
>
> 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@....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
>
>
>

If that fixes the issue, allows us to revert cansleep to false and
doesn't cause any problems - yes, for sure.

Do you want to send a patch?

Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ