All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
	Svyatoslav Ryhel <clamor95@gmail.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Dmitry Baryshkov" <lumag@kernel.org>,
	"Dimitri Fedrau" <dima.fedrau@gmail.com>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Pengyu Luo" <mitltlatltl@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] power: supply: add EXTCON dependency
Date: Sat,  3 May 2025 16:04:26 +0200	[thread overview]
Message-ID: <20250503140431.438727-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

max8971 is written to work with or without extcon, but it fails
to link when built-in when the extcon subsystem is in a loadable
module:

x86_64-linux-ld: drivers/power/supply/max8971_charger.o: in function `max8971_probe':
max8971_charger.c:(.text+0x2ab): undefined reference to `extcon_find_edev_by_node'

Add the appropriate dependency that allows the working cases but
prevents the link failure.

Fixes: 60cd40eee4f4 ("power: supply: Add support for Maxim MAX8971 charger")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/supply/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index 797c8d1b04aa..daab8214e225 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -621,6 +621,7 @@ config CHARGER_MAX77976
 config CHARGER_MAX8971
 	tristate "Maxim MAX8971 battery charger driver"
 	depends on I2C
+	depends on EXTCON || !EXTCON
 	select REGMAP_I2C
 	help
 	  The MAX8971 is a compact, high-frequency, high-efficiency switch-mode
-- 
2.39.5


             reply	other threads:[~2025-05-03 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-03 14:04 Arnd Bergmann [this message]
2025-05-03 17:18 ` [PATCH] power: supply: add EXTCON dependency Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250503140431.438727-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=andreas@kemnade.info \
    --cc=arnd@arndb.de \
    --cc=clamor95@gmail.com \
    --cc=dima.fedrau@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=linux@weissschuh.net \
    --cc=lumag@kernel.org \
    --cc=mitltlatltl@gmail.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.