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

Manivannan Sadhasivam posted 2 patches 1 week, 4 days ago
[PATCH 1/2] PCI/pwrctrl: tc9563: Enforce I2C dependency
Posted by Manivannan Sadhasivam 1 week, 4 days ago
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':
>> (.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'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511200555.M4TX84jK-lkp@intel.com
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
---
 drivers/pci/pwrctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/pwrctrl/Kconfig b/drivers/pci/pwrctrl/Kconfig
index b43fdf052d37..e0f999f299bb 100644
--- a/drivers/pci/pwrctrl/Kconfig
+++ b/drivers/pci/pwrctrl/Kconfig
@@ -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.
-- 
2.48.1
Re: [PATCH 1/2] PCI/pwrctrl: tc9563: Enforce I2C dependency
Posted by Bartosz Golaszewski 1 week, 4 days ago
On Thu, 20 Nov 2025 07:51:15 +0100, Manivannan Sadhasivam
<manivannan.sadhasivam@oss.qualcomm.com> said:
> 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':
>>> (.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'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202511200555.M4TX84jK-lkp@intel.com
> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
> ---
>  drivers/pci/pwrctrl/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/pwrctrl/Kconfig b/drivers/pci/pwrctrl/Kconfig
> index b43fdf052d37..e0f999f299bb 100644
> --- a/drivers/pci/pwrctrl/Kconfig
> +++ b/drivers/pci/pwrctrl/Kconfig
> @@ -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.
> --
> 2.48.1
>
>

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>