mfd: simple-mfd-i2c: remove select I2C_K1
Subsystems (3)
Troy Mitchell
reviewerPATCH 1/1 mfd: simple-mfd-i2c: remove select I2C_K1
select will force a symbol to a specific value without considering its dependencies. As a result, the i2c-k1 driver will fail to build when OF or COMMON_CLK are disabled.
The reason for removing I2C_K1 instead of adding a depends on condition is to keep the possibility for other SoCs to use this PMIC.
--- drivers/mfd/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/mfd/Kconfig +0 -1
@@ -1258,7 +1258,6 @@ config MFD_SPACEMIT_P1 tristate "SpacemiT P1 PMIC" depends on ARCH_SPACEMIT || COMPILE_TEST depends on I2C - select I2C_K1 select MFD_SIMPLE_MFD_I2C help This option supports the I2C-based SpacemiT P1 PMIC, which
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251021-p1-kconfig-fix-6d2b59d03b8f
Best regards,
Signature · 1 line
Troy Mitchell <[email protected]>
Quoted 3 lines · Troy Mitchell
select will force a symbol to a specific value without considering its dependencies. As a result, the i2c-k1 driver will fail to build when OF or
COMMON_CLKare disabled.
Should config I2C_K1 depend on COMMON_CLK then?
But you're right, the selecting config should ensure the dependencies of the selected one are satisfied.
Quoted 2 lines
The reason for removing
I2C_K1instead of adding a depends on condition is to keep the possibility for other SoCs to use this PMIC.
Quoted 26 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Troy Mitchell <[email protected]>--- drivers/mfd/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/mfd/Kconfig +0
-2@@ -1258,7 +1258,6 @@ config MFD_SPACEMIT_P1 tristate "SpacemiT P1 PMIC" depends on ARCH_SPACEMIT || COMPILE_TEST depends on I2C - select I2C_K1 select MFD_SIMPLE_MFD_I2C help This option supports the I2C-based SpacemiT P1 PMIC, which ---base-commit:
3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251021-p1-kconfig-fix-6d2b59d03b8fBest regards,
Troy Mitchell
reviewerQuoted 6 lines · Alex Elder
Quoted 3 lines · Troy Mitchell
select will force a symbol to a specific value without considering its dependencies. As a result, the i2c-k1 driver will fail to build when OF or
COMMON_CLKare disabled.Should config
I2C_K1depend onCOMMON_CLKthen?
Yes, this patch [1] registers the ILCR as a clock.
Quoted 3 lines
But you're right, the selecting config should ensure the dependencies of the selected one are satisfied.
And the config REGULATOR_SPACEMIT_P1 select MFD_SPACEMIT_P1(RTC same). Should we change it to depends on?
Quoted 5 lines
Quoted 3 lines
The reason for removing
I2C_K1instead of adding a depends on condition is to keep the possibility for other SoCs to use this PMIC.Acked-by Alex Elder <[email protected]>
Thanks.
- Troy
Link:
https://lore.kernel.org/all/[email protected]/ [1]
Quoted 29 lines
Quoted 27 lines
Reported-by kernel test robot <[email protected]>Signed-off-by Troy Mitchell <[email protected]>--- drivers/mfd/Kconfig | 1 - 1 file changed, 1 deletion(-)drivers/mfd/Kconfig +0
-2@@ -1258,7 +1258,6 @@ config MFD_SPACEMIT_P1 tristate "SpacemiT P1 PMIC" depends on ARCH_SPACEMIT || COMPILE_TEST depends on I2C - select I2C_K1 select MFD_SIMPLE_MFD_I2C help This option supports the I2C-based SpacemiT P1 PMIC, which ---base-commit:
3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251021-p1-kconfig-fix-6d2b59d03b8fBest regards,
Troy Mitchell
reviewerQuoted 6 lines · Troy Mitchell
Quoted 5 lines · Alex Elder
Quoted 3 lines · Troy Mitchell
select will force a symbol to a specific value without considering its dependencies. As a result, the i2c-k1 driver will fail to build when OF or
COMMON_CLKare disabled.
Quoted 8 lines
Quoted 1 line
Should config
I2C_K1depend onCOMMON_CLKthen?Yes, this patch [1] registers the ILCR as a clock.
Quoted 3 lines
But you're right, the selecting config should ensure the dependencies of the selected one are satisfied.
And the config
REGULATOR_SPACEMIT_P1selectMFD_SPACEMIT_P1(RTC same). Should we change it to depends on?
Yixun has suggessted here[1] and I think too.