From: Bjorn Helgaas <helgaas@kernel.org>
To: Abel Vesa <abel.vesa@oss.qualcomm.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI/pwrctrl: tc9563: Use gpiod_set_value_cansleep() for RESX
Date: Thu, 3 Sep 2026 15:48:00 -0500 [thread overview]
Message-ID: <20260903204800.GA2243889@bhelgaas> (raw)
In-Reply-To: <20260825-pci-pwrctl-tc9563-use-cansleep-for-resx-v1-1-0dbe7cfd8200@oss.qualcomm.com>
On Tue, Aug 25, 2026 at 02:41:31PM +0300, Abel Vesa wrote:
> The RESX GPIO may be provided by a sleeping GPIO controller, such as an
> I2C or SPI I/O expander. Calling gpiod_set_value() for such a GPIO
> triggers the following warning:
>
> WARNING: ... drivers/gpio/gpiolib.c:4030 at gpiod_set_value()
>
> The TC9563 power-on and power-off callbacks already sleep while enabling
> or disabling regulators and while waiting for oscillator stabilization.
> Use gpiod_set_value_cansleep() for RESX so it can be driven without
> triggering the warning.
>
> Fixes: 4c9c7be47310 ("PCI: pwrctrl: Add power control driver for TC9563")
> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Applied to pci/pwrctrl for v7.4 with subject line:
PCI/pwrctrl: tc9563: Allow RESX reset assertion to sleep
to focus on the behavioral change. Let me know if this doesn't
capture it correctly.
> ---
> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> index fd53a7db9875..1b7718d07d15 100644
> --- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> +++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> @@ -481,7 +481,7 @@ static int tc9563_pwrctrl_power_off(struct pci_pwrctrl *pwrctrl)
> struct tc9563_pwrctrl *tc9563 = container_of(pwrctrl,
> struct tc9563_pwrctrl, pwrctrl);
>
> - gpiod_set_value(tc9563->reset_gpio, 1);
> + gpiod_set_value_cansleep(tc9563->reset_gpio, 1);
>
> regulator_bulk_disable(ARRAY_SIZE(tc9563->supplies), tc9563->supplies);
>
> @@ -501,7 +501,7 @@ static int tc9563_pwrctrl_power_on(struct pci_pwrctrl *pwrctrl)
> if (ret < 0)
> return dev_err_probe(dev, ret, "cannot enable regulators\n");
>
> - gpiod_set_value(tc9563->reset_gpio, 0);
> + gpiod_set_value_cansleep(tc9563->reset_gpio, 0);
>
> fsleep(TC9563_OSC_STAB_DELAY_US);
>
>
> ---
> base-commit: 4b18edbd8e70f7e6860d56370f13244896d0f95c
> change-id: 20260825-pci-pwrctl-tc9563-use-cansleep-for-resx-f6e1f65547fc
>
> Best regards,
> --
> Abel Vesa <abel.vesa@oss.qualcomm.com>
>
prev parent reply other threads:[~2026-09-03 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 11:41 Abel Vesa
2026-08-26 9:23 ` Bartosz Golaszewski
2026-09-02 14:08 ` Manivannan Sadhasivam
2026-09-03 20:48 ` Bjorn Helgaas [this message]
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=20260903204800.GA2243889@bhelgaas \
--to=helgaas@kernel.org \
--cc=abel.vesa@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bhelgaas@google.com \
--cc=brgl@kernel.org \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@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
all inboxes | Powered by JetHome®