[PATCH v1 0/2] Add pinctrl_pm_select_init_state helper function

Christian Bruel posted 2 patches 4 months ago
Documentation/driver-api/pin-control.rst | 58 ++++++++++++++++++++++--
drivers/pinctrl/core.c                   | 13 ++++++
include/linux/pinctrl/consumer.h         | 10 ++++
3 files changed, 78 insertions(+), 3 deletions(-)
[PATCH v1 0/2] Add pinctrl_pm_select_init_state helper function
Posted by Christian Bruel 4 months ago
Some platforms need to set the pinctrl to an initial state during
pm_resume, just like during probe. To achieve this, the missing function
pinctrl_pm_select_init_state() is added to the list of already existing
pinctrl PM helper functions.

This allows a driver to use the pinctrl init and default states in the
pm_runtime platform resume handlers, just as in probe.

Additionally the missing documentation describing these pinctrl standard
states used during probe has been added.

This fixes a build issue for the STM32MP25 PCIe staged in the pcie tree,
id 5a972a01e24b
 
Changes in v1:
   - Add missing information about PM helper functions.

Christian Bruel (2):
  Documentation: pinctrl: Describe PM helper functions for standard
    states.
  pinctrl: Add pinctrl_pm_select_init_state helper function

 Documentation/driver-api/pin-control.rst | 58 ++++++++++++++++++++++--
 drivers/pinctrl/core.c                   | 13 ++++++
 include/linux/pinctrl/consumer.h         | 10 ++++
 3 files changed, 78 insertions(+), 3 deletions(-)

-- 
2.34.1
Re: [PATCH v1 0/2] Add pinctrl_pm_select_init_state helper function
Posted by Linus Walleij 3 months, 3 weeks ago
On Wed, Aug 13, 2025 at 10:13 AM Christian Bruel
<christian.bruel@foss.st.com> wrote:

> Some platforms need to set the pinctrl to an initial state during
> pm_resume, just like during probe. To achieve this, the missing function
> pinctrl_pm_select_init_state() is added to the list of already existing
> pinctrl PM helper functions.
>
> This allows a driver to use the pinctrl init and default states in the
> pm_runtime platform resume handlers, just as in probe.
>
> Additionally the missing documentation describing these pinctrl standard
> states used during probe has been added.
>
> This fixes a build issue for the STM32MP25 PCIe staged in the pcie tree,
> id 5a972a01e24b

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Björn: Just apply this to the PCI tree.

Yours,
Linus Walleij
Re: [PATCH v1 0/2] Add pinctrl_pm_select_init_state helper function
Posted by Bjorn Helgaas 3 months, 3 weeks ago
On Mon, Aug 18, 2025 at 05:32:14PM +0200, Linus Walleij wrote:
> On Wed, Aug 13, 2025 at 10:13 AM Christian Bruel
> <christian.bruel@foss.st.com> wrote:
> 
> > Some platforms need to set the pinctrl to an initial state during
> > pm_resume, just like during probe. To achieve this, the missing function
> > pinctrl_pm_select_init_state() is added to the list of already existing
> > pinctrl PM helper functions.
> >
> > This allows a driver to use the pinctrl init and default states in the
> > pm_runtime platform resume handlers, just as in probe.
> >
> > Additionally the missing documentation describing these pinctrl standard
> > states used during probe has been added.
> >
> > This fixes a build issue for the STM32MP25 PCIe staged in the pcie tree,
> > id 5a972a01e24b
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Björn: Just apply this to the PCI tree.

Thanks, Linus, will do!

Bjorn