linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: supply: max8997_charger: make EXTCON dependency unconditional
@ 2021-03-08 15:29 Arnd Bergmann
  2021-03-08 15:33 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arnd Bergmann @ 2021-03-08 15:29 UTC (permalink / raw)
  To: Sebastian Reichel, Timon Baetz, Krzysztof Kozlowski
  Cc: Arnd Bergmann, Matti Vaittinen, Andy Shevchenko, linux-pm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Some of the extcon interfaces have a fallback implementation that can
be used when EXTCON is disabled, but some others do not, causing a
build failure:

drivers/power/supply/max8997_charger.c:261:9: error: implicit declaration of function 'devm_extcon_register_notifier_all' [-Werror,-Wimplicit-function-declaration]
                ret = devm_extcon_register_notifier_all(&pdev->dev, charger->edev,
                      ^
drivers/power/supply/max8997_charger.c:261:9: note: did you mean 'devm_extcon_register_notifier'?
include/linux/extcon.h:263:19: note: 'devm_extcon_register_notifier' declared here
static inline int devm_extcon_register_notifier(struct device *dev,

I assume there is no reason to actually build this driver without extcon
support, so a hard dependency is the easiest fix. Alternatively the
header file could be extended to provide additional inline stubs.

Fixes: f384989e88d4 ("power: supply: max8997_charger: Set CHARGER current limit")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/supply/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 006b95eca673..6cce17e1d47a 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -555,7 +555,7 @@ config CHARGER_MAX77693
 config CHARGER_MAX8997
 	tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver"
 	depends on MFD_MAX8997 && REGULATOR_MAX8997
-	depends on EXTCON || !EXTCON
+	depends on EXTCON
 	help
 	  Say Y to enable support for the battery charger control sysfs and
 	  platform data of MAX8997/LP3974 PMICs.
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-09  9:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 15:29 [PATCH] power: supply: max8997_charger: make EXTCON dependency unconditional Arnd Bergmann
2021-03-08 15:33 ` Krzysztof Kozlowski
2021-03-08 16:02   ` Arnd Bergmann
2021-03-08 16:11     ` Krzysztof Kozlowski
2021-03-09 10:11       ` Chanwoo Choi
2021-03-08 15:50 ` Matti Vaittinen
2021-03-08 16:07   ` Arnd Bergmann
2021-03-08 16:06 ` Andy Shevchenko
2021-03-08 16:10   ` Andy Shevchenko
2021-03-08 16:31   ` Vaittinen, Matti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).