PHY: Exynos: fix I2C dependency for Exynos5250 SATA
PATCH 1/1 PHY: Exynos: fix I2C dependency for Exynos5250 SATA
Device drivers should not 'select' other subsystems, but rather use 'depends on', to avoid Kconfig dependency loops. This one even selects a particular I2C host driver for no reason, so we can remove the select of that particular driver, and turn the I2C 'select' into 'depends on'.
--- drivers/phy/samsung/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/phy/samsung/Kconfig +1 -2
@@ -83,10 +83,9 @@ config PHY_EXYNOS5250_SATA tristate "Exynos5250 Sata SerDes/PHY driver" depends on SOC_EXYNOS5250 depends on HAS_IOMEM + depends on I2C depends on OF select GENERIC_PHY - select I2C - select I2C_S3C2410 select MFD_SYSCON help Enable this to support SATA SerDes/Phy found on Samsung's
Signature · 1 line
2.9.0
Quoted 18 lines · Arnd Bergmann
Device drivers should not 'select' other subsystems, but rather use 'depends on', to avoid
Kconfigdependency loops. This one even selects a particular I2C host driver for no reason, so we can remove the select of that particular driver, and turn the I2C 'select' into 'depends on'.Fixes bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/phy/samsung/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/phy/samsung/Kconfig +0
-0@@ -83,10 +83,9 @@ config PHY_EXYNOS5250_SATA tristate "Exynos5250 Sata SerDes/PHY driver"
drivers/phy/samsung/Kconfig config PHY_EXYNOS5250_SATA · line 91
Quoted 10 lines
drivers/phy/samsung/Kconfig +1
-2depends on SOC_EXYNOS5250 depends on HAS_IOMEM + depends on I2C depends on OF select GENERIC_PHY - select I2C - select I2C_S3C2410 select MFD_SYSCON help Enable this to support SATA SerDes/Phy found on Samsung's
I think this effectively might disable the I2C_S3C2410 on exynos_defconfig. Previously, the defconfig chosen PHY_EXYNOS5250_SATA which selected the I2C_S3C2410. Now the I2C_S3C2410 will remain forgotten.
BTW, It might be also useful to do similar for EXTCON and PHY_ROCKCHIP_TYPEC.
Best regards,
Krzysztof
Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Arnd Bergmann
Device drivers should not 'select' other subsystems, but rather use 'depends on', to avoid
Kconfigdependency loops. This one even selects a particular I2C host driver for no reason, so we can remove the select of that particular driver, and turn the I2C 'select' into 'depends on'.Fixes bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/phy/samsung/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/phy/samsung/Kconfig +1
-2@@ -83,10 +83,9 @@ config PHY_EXYNOS5250_SATA tristate "Exynos5250 Sata SerDes/PHY driver" depends on SOC_EXYNOS5250 depends on HAS_IOMEM + depends on I2C depends on OF select GENERIC_PHY - select I2C - select I2C_S3C2410
Quoted 8 lines
drivers/phy/samsung/Kconfig config PHY_EXYNOS5250_SATA · line 91
Quoted 3 lines
drivers/phy/samsung/Kconfig +0
-0select MFD_SYSCON help Enable this to support SATA SerDes/Phy found on Samsung'sI think this effectively might disable the
I2C_S3C2410onexynos_defconfig. Previously, the defconfig chosenPHY_EXYNOS5250_SATAwhich selected theI2C_S3C2410. Now theI2C_S3C2410will remain forgotten.
Good point. I only checked that CONFIG_I2C was still enabled, but didn't consider the specific driver.
Quoted 1 line
BTW, It might be also useful to do similar for EXTCON and
PHY_ROCKCHIP_TYPEC.
Right. We have more problems like this, I was planning to see where I got with the I2C ones first, but that is another one I had not noticed yet.
Arnd