linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: supply: axp20x_usb_power: add IIO dependency
@ 2017-04-27 19:11 Arnd Bergmann
  2017-05-01 11:34 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-04-27 19:11 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Arnd Bergmann, Quentin Schulz, linux-pm, linux-kernel

When CONFIG_IIO=m and the axp20x_usb_power driver is built-in, we get
a link time error:

drivers/power/built-in.o: In function `axp20x_usb_power_get_property':
undefined reference to `iio_read_channel_processed'
drivers/power/built-in.o: In function `axp20x_usb_power_probe':
undefined reference to `devm_iio_channel_get'
undefined reference to `devm_iio_channel_get'

This adds the same dependency that we already have for the AC power driver
to the USB power driver. For consistency, I'm also moving the two closer
together in the Kconfig file.

Fixes: 33863c938caa ("power: supply: axp20x_usb_power: use IIO channels when available")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/supply/Kconfig | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index da922756149f..ca1eb456cc4f 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -238,6 +238,14 @@ config CHARGER_AXP20X
 	  This driver can also be built as a module. If so, the module will be
 	  called axp20x_ac_power.
 
+config AXP20X_POWER
+	tristate "AXP20x power supply driver"
+	depends on MFD_AXP20X
+	depends on IIO
+	help
+	  This driver provides support for the power supply features of
+	  AXP20x PMIC.
+
 config AXP288_CHARGER
 	tristate "X-Powers AXP288 Charger"
 	depends on MFD_AXP20X && EXTCON_AXP288
@@ -541,11 +549,4 @@ config CHARGER_RT9455
 	help
 	  Say Y to enable support for Richtek RT9455 battery charger.
 
-config AXP20X_POWER
-	tristate "AXP20x power supply driver"
-	depends on MFD_AXP20X
-	help
-	  This driver provides support for the power supply features of
-	  AXP20x PMIC.
-
 endif # POWER_SUPPLY
-- 
2.9.0

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

* Re: [PATCH] power: supply: axp20x_usb_power: add IIO dependency
  2017-04-27 19:11 [PATCH] power: supply: axp20x_usb_power: add IIO dependency Arnd Bergmann
@ 2017-05-01 11:34 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2017-05-01 11:34 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Quentin Schulz, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Hi,

On Thu, Apr 27, 2017 at 09:11:48PM +0200, Arnd Bergmann wrote:
> When CONFIG_IIO=m and the axp20x_usb_power driver is built-in, we get
> a link time error:
> 
> drivers/power/built-in.o: In function `axp20x_usb_power_get_property':
> undefined reference to `iio_read_channel_processed'
> drivers/power/built-in.o: In function `axp20x_usb_power_probe':
> undefined reference to `devm_iio_channel_get'
> undefined reference to `devm_iio_channel_get'
> 
> This adds the same dependency that we already have for the AC power driver
> to the USB power driver. For consistency, I'm also moving the two closer
> together in the Kconfig file.
> 
> Fixes: 33863c938caa ("power: supply: axp20x_usb_power: use IIO channels when available")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, queued.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-05-01 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 19:11 [PATCH] power: supply: axp20x_usb_power: add IIO dependency Arnd Bergmann
2017-05-01 11:34 ` Sebastian Reichel

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).