Skip to contentSkip to conversation

PCI/pwrctrl: tc9563: A couple of fixes

PATCH In review Manivannan Sadhasivam 3 participants 6 messages Nov 20, 2025 – Nov 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover PCI/pwrctrl: tc9563: A couple of fixes

Hi Bjorn,

Please squash these fixes with the offending commit.

- Mani

Manivannan Sadhasivam (2):
PCI/pwrctrl: tc9563: Enforce I2C dependency PCI/pwrctrl: tc9563: Remove unnecessary semicolons

 drivers/pci/pwrctrl/Kconfig              | 1 +
 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/2 PCI/pwrctrl: tc9563: Enforce I2C dependency

This driver depends on the I2C interface to configure the switch. So enforce the dependency in Kconfig so that the I2C interface is selected appropriately. This also avoids the build issues like the one reported by the LKP bot:

alpha-linux-ld: alpha-linux-ld: DWARF error: could not find abbrev number 14070 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.o: in function `tc9563_pwrctrl_remove':

Quoted 3 lines
Quoted 3 lines

(.text+0x4c): undefined reference to `i2c_unregister_device'
alpha-linux-ld: (.text+0x50): undefined reference to `i2c_unregister_device'
alpha-linux-ld: (.text+0x60): undefined reference to `i2c_put_adapter'

alpha-linux-ld: (.text+0x64): undefined reference to `i2c_put_adapter'

---
 drivers/pci/pwrctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/pwrctrl/Kconfig +1 -0
index b43fdf052d37..e0f999f299bb 100644
@@ -26,6 +26,7 @@ config PCI_PWRCTRL_TC9563
 	tristate "PCI Power Control driver for TC9563 PCIe switch"
 	select PCI_PWRCTRL
 	default m if ARCH_QCOM
+	depends on I2C
 	help
 	  Say Y here to enable the PCI Power Control driver of TC9563 PCIe
 	  switch.
Signature · 1 line
2.48.1
#3 lore raw

PATCH 2/2 PCI/pwrctrl: tc9563: Remove unnecessary semicolons

In reply to Manivannan Sadhasivam

As reported by the LKP bot, semicolons are not needed at the end of the switch and if blocks. Hence, remove them.

This fixes the below cocci warnings:

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:351:2-3: Unneeded semicolon

     drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:414:2-3: Unneeded semicolon
     drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:316:2-3: Unneeded semicolon
---
 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c +3 -3
index 46339a23204f..ec423432ac65 100644
@@ -313,7 +313,7 @@ static int tc9563_pwrctrl_set_tx_amplitude(struct tc9563_pwrctrl_ctx *ctx,
 		break;
 	default:
 		return -EINVAL;
-	};
+	}
 
 	struct tc9563_pwrctrl_reg_setting tx_amp_seq[] = {
 		{TC9563_PORT_ACCESS_ENABLE, port_access},
@@ -348,7 +348,7 @@ static int tc9563_pwrctrl_disable_dfe(struct tc9563_pwrctrl_ctx *ctx,
 		break;
 	default:
 		return -EINVAL;
-	};
+	}
 
 	struct tc9563_pwrctrl_reg_setting disable_dfe_seq[] = {
 		{TC9563_PORT_ACCESS_ENABLE, port_access},
@@ -411,7 +411,7 @@ static int tc9563_pwrctrl_parse_device_dt(struct tc9563_pwrctrl_ctx *ctx, struct
 	if (!of_device_is_available(node)) {
 		cfg->disable_port = true;
 		return 0;
-	};
+	}
 
 	ret = of_property_read_u32(node, "aspm-l0s-entry-delay-ns", &cfg->l0s_delay);
 	if (ret && ret != -EINVAL)
Signature · 1 line
2.48.1
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] PCI/pwrctrl: tc9563: Enforce I2C dependency

In reply to Manivannan Sadhasivam
Quoted 32 lines · Manivannan Sadhasivam

This driver depends on the I2C interface to configure the switch. So enforce the dependency in Kconfig so that the I2C interface is selected appropriately. This also avoids the build issues like the one reported by the LKP bot:

alpha-linux-ld: alpha-linux-ld: DWARF error: could not find abbrev number 14070 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.o: in function `tc9563_pwrctrl_remove':

Quoted 3 lines
Quoted 3 lines

(.text+0x4c): undefined reference to `i2c_unregister_device'
alpha-linux-ld: (.text+0x50): undefined reference to `i2c_unregister_device'
alpha-linux-ld: (.text+0x60): undefined reference to `i2c_put_adapter'

alpha-linux-ld: (.text+0x64): undefined reference to `i2c_put_adapter'

---
 drivers/pci/pwrctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/pwrctrl/Kconfig +1 -1
index b43fdf052d37..e0f999f299bb 100644
@@ -26,6 +26,7 @@ config PCI_PWRCTRL_TC9563
 	tristate "PCI Power Control driver for TC9563 PCIe switch"
 	select PCI_PWRCTRL
 	default m if ARCH_QCOM
+	depends on I2C
 	help
 	  Say Y here to enable the PCI Power Control driver of TC9563 PCIe
 	  switch.
--
Quoted 3 lines

2.48.1

Acked-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] PCI/pwrctrl: tc9563: Remove unnecessary semicolons

In reply to Manivannan Sadhasivam
Quoted 10 lines · Manivannan Sadhasivam

As reported by the LKP bot, semicolons are not needed at the end of the switch and if blocks. Hence, remove them.

This fixes the below cocci warnings:

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:351:2-3: Unneeded semicolon

     drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:414:2-3: Unneeded semicolon
     drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:316:2-3: Unneeded semicolon
Quoted 7 lines
---
 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
#5 lore raw
In reply to Manivannan Sadhasivam
Quoted 6 lines · Manivannan Sadhasivam

Hi Bjorn,

Please squash these fixes with the offending commit.

- Mani

Quoted 7 lines

Manivannan Sadhasivam (2):
PCI/pwrctrl: tc9563: Enforce I2C dependency PCI/pwrctrl: tc9563: Remove unnecessary semicolons

 drivers/pci/pwrctrl/Kconfig              | 1 +
 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

Squashed into pci/pwrctrl-tc9563, thanks!