Re: [PATCH 3/6] PCI/pwrctrl: tc9563: Power off only the external ports in tc9563_pwrctrl_disable_port()

From: Bartosz Golaszewski

Date: Mon Jul 27 2026 - 10:32:25 EST


On Sat, 25 Jul 2026 10:59:15 +0200, Manivannan Sadhasivam via B4 Relay
<devnull+manivannan.sadhasivam.oss.qualcomm.com@xxxxxxxxxx> said:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
>
> TC9563 supports powering off only the external facing ports like DSP1 and
> DSP2. It is not recommended to power off USP and DSP3 as they have fixed
> ports/endpoint connected.
>
> Hence, fix tc9563_pwrctrl_disable_port() to power off only DSP1 and DSP2.
>
> Fixes: 4c9c7be47310 ("PCI: pwrctrl: Add power control driver for TC9563")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
> ---
> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> index 482e82e433dd..ca19bf60d290 100644
> --- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> +++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> @@ -241,12 +241,18 @@ static int tc9563_pwrctrl_disable_port(struct tc9563_pwrctrl *tc9563,
> if (!cfg->disable_port)
> return 0;
>
> - if (port == TC9563_DSP1) {
> + switch (port) {
> + case TC9563_DSP1:
> seq = dsp1_pwroff_seq;
> len = ARRAY_SIZE(dsp1_pwroff_seq);
> - } else {
> + break;
> + case TC9563_DSP2:
> seq = dsp2_pwroff_seq;
> len = ARRAY_SIZE(dsp2_pwroff_seq);
> + break;
> + default:
> + /* Only external downstream ports DSP1/DSP2 can be powered off */
> + return 0;
> }
>
> ret = tc9563_pwrctrl_i2c_bulk_write(tc9563->client, seq, len);
>
> --
> 2.43.0
>
>
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>