Commit 6254a6a9 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Sebastian Reichel

power: supply: axp20x_usb_power: add IIO dependency

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: 33863c93 ("power: supply: axp20x_usb_power: use IIO channels when available")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent 8b208399
...@@ -250,6 +250,14 @@ config BATTERY_AXP20X ...@@ -250,6 +250,14 @@ config BATTERY_AXP20X
This driver can also be built as a module. If so, the module will be This driver can also be built as a module. If so, the module will be
called axp20x_battery. called axp20x_battery.
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 config AXP288_CHARGER
tristate "X-Powers AXP288 Charger" tristate "X-Powers AXP288 Charger"
depends on MFD_AXP20X && EXTCON_AXP288 depends on MFD_AXP20X && EXTCON_AXP288
...@@ -553,11 +561,4 @@ config CHARGER_RT9455 ...@@ -553,11 +561,4 @@ config CHARGER_RT9455
help help
Say Y to enable support for Richtek RT9455 battery charger. 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 endif # POWER_SUPPLY
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment