extcon-ptn5150: fix COMPILE_TEST dependencies
PATCH 1/1 extcon-ptn5150: fix COMPILE_TEST dependencies
The PTN5150 dependencies look like they were meant to do the right thing, but they actually should not allow building without I2C for compile testing, as that results in a Kconfig warning and subsequent build failure:
WARNING: unmet direct dependencies detected for REGMAP_I2C
Depends on [m]: I2C [=m]
Selected by [y]:
- EXTCON_PTN5150 [=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] || COMPILE_TEST [=y])
Selected by [m]:
- EEPROM_AT24 [=m] && I2C [=m] && SYSFS [=y]
- KEYBOARD_CAP11XX [=m] && !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && OF [=y] && I2C [=m]
- INPUT_DRV260X_HAPTICS [=m] && !UML && INPUT_MISC [=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] || COMPILE_TEST [=y])
- ... [many others]
Add parentheses around the expression so we can compile-test without GPIOLIB but not without I2C.
--- drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/Kconfig +1 -1
@@ -116,7 +116,7 @@ config EXTCON_PALMAS config EXTCON_PTN5150 tristate "NXP PTN5150 CC LOGIC USB EXTCON support" - depends on I2C && GPIOLIB || COMPILE_TEST + depends on I2C && (GPIOLIB || COMPILE_TEST) select REGMAP_I2C help Say Y here to enable support for USB peripheral and USB host
Signature · 1 line
2.20.0
Quoted 15 lines · Arnd Bergmann
The PTN5150 dependencies look like they were meant to do the right thing, but they actually should not allow building without I2C for compile testing, as that results in a
Kconfigwarning and subsequent build failure:WARNING: unmet direct dependencies detected for
REGMAP_I2C
Depends on [m]: I2C [=m]
Selected by [y]:
-EXTCON_PTN5150[=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] ||COMPILE_TEST[=y])
Selected by [m]:
-EEPROM_AT24[=m] && I2C [=m] && SYSFS [=y]
-KEYBOARD_CAP11XX[=m] && !UML && INPUT [=y] &&INPUT_KEYBOARD[=y] && OF [=y] && I2C [=m]
-INPUT_DRV260X_HAPTICS[=m] && !UML &&INPUT_MISC[=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] ||COMPILE_TEST[=y])
- ... [many others]
Quoted 5 lines
Add parentheses around the expression so we can compile-test without GPIOLIB but not without I2C.
Fixes 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")Signed-off-by Arnd Bergmann <[email protected]>
Hi Chanwoo,
You might want to drop my patch and use this one from Arnd instead...
Quoted 18 lines
--- drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/extcon/Kconfig +1
-1@@ -116,7 +116,7 @@ config EXTCON_PALMAS config EXTCON_PTN5150 tristate "NXP PTN5150 CC LOGIC USB EXTCON support" - depends on I2C && GPIOLIB || COMPILE_TEST + depends on I2C && (GPIOLIB || COMPILE_TEST) select REGMAP_I2C help Say Y here to enable support for USB peripheral and USB host
Signature · 1 line
~Randy
Chanwoo Choi
maintainerHi Randy,
Quoted 19 lines · Randy Dunlap
Quoted 18 lines · Arnd Bergmann
The PTN5150 dependencies look like they were meant to do the right thing, but they actually should not allow building without I2C for compile testing, as that results in a
Kconfigwarning and subsequent build failure:WARNING: unmet direct dependencies detected for
REGMAP_I2C
Depends on [m]: I2C [=m]
Selected by [y]:
-EXTCON_PTN5150[=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] ||COMPILE_TEST[=y])
Selected by [m]:
-EEPROM_AT24[=m] && I2C [=m] && SYSFS [=y]
-KEYBOARD_CAP11XX[=m] && !UML && INPUT [=y] &&INPUT_KEYBOARD[=y] && OF [=y] && I2C [=m]
-INPUT_DRV260X_HAPTICS[=m] && !UML &&INPUT_MISC[=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] ||COMPILE_TEST[=y])
- ... [many others]Add parentheses around the expression so we can compile-test without GPIOLIB but not without I2C.
Quoted 6 lines
Quoted 2 lines
Fixes 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")Signed-off-by Arnd Bergmann <[email protected]>Hi Chanwoo,
You might want to drop my patch and use this one from Arnd instead...
Thanks for your comment. I'll do that.
Quoted 22 lines
Quoted 20 lines
--- drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/extcon/Kconfig +1
-1@@ -116,7 +116,7 @@ config EXTCON_PALMAS config EXTCON_PTN5150 tristate "NXP PTN5150 CC LOGIC USB EXTCON support" - depends on I2C && GPIOLIB || COMPILE_TEST + depends on I2C && (GPIOLIB || COMPILE_TEST) select REGMAP_I2C help Say Y here to enable support for USB peripheral and USB host
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics
Hi,
Quoted 30 lines · Arnd Bergmann
The PTN5150 dependencies look like they were meant to do the right thing, but they actually should not allow building without I2C for compile testing, as that results in a
Kconfigwarning and subsequent build failure:WARNING: unmet direct dependencies detected for
REGMAP_I2C
Depends on [m]: I2C [=m]
Selected by [y]:
-EXTCON_PTN5150[=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] ||COMPILE_TEST[=y])
Selected by [m]:
-EEPROM_AT24[=m] && I2C [=m] && SYSFS [=y]
-KEYBOARD_CAP11XX[=m] && !UML && INPUT [=y] &&INPUT_KEYBOARD[=y] && OF [=y] && I2C [=m]
-INPUT_DRV260X_HAPTICS[=m] && !UML &&INPUT_MISC[=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] ||COMPILE_TEST[=y])
- ... [many others]Add parentheses around the expression so we can compile-test without GPIOLIB but not without I2C.
Fixes 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/extcon/Kconfig +0
-0
drivers/extcon/Kconfig config EXTCON_PALMAS · line 122
Quoted 8 lines
drivers/extcon/Kconfig +1
-1@@ -116,7 +116,7 @@ config EXTCON_PALMAS config EXTCON_PTN5150 tristate "NXP PTN5150 CC LOGIC USB EXTCON support" - depends on I2C && GPIOLIB || COMPILE_TEST + depends on I2C && (GPIOLIB || COMPILE_TEST) select REGMAP_I2C help Say Y here to enable support for USB peripheral and USB host
Applied it to extcon-fixes branch for v5.0-rc2.
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics