From: Chris Morgan <macromorgan@xxxxxxxxxxx> Since commit e37ec3218870 ("mfd: axp20x: Allow multiple regulators") the drivers for AC, battery, and USB have failed to probe when the option of CONFIG_AXP20X_ADC is enabled. This appears to be because the existing function devm_iio_channel_get() no longer calls iio_channel_get_sys(). Use the newly created function of devm_iio_channel_get_sys() instead. Fixes: e37ec3218870 ("mfd: axp20x: Allow multiple regulators") Signed-off-by: Chris Morgan <macromorgan@xxxxxxxxxxx> --- drivers/power/supply/axp20x_ac_power.c | 4 ++-- drivers/power/supply/axp20x_battery.c | 16 ++++++++-------- drivers/power/supply/axp20x_usb_power.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c index e5733cb9e19e..07de889af16b 100644 --- a/drivers/power/supply/axp20x_ac_power.c +++ b/drivers/power/supply/axp20x_ac_power.c @@ -343,14 +343,14 @@ static int axp20x_ac_power_probe(struct platform_device *pdev) return -ENOMEM; if (axp_data->acin_adc) { - power->acin_v = devm_iio_channel_get(&pdev->dev, "acin_v"); + power->acin_v = devm_iio_channel_get_sys(&pdev->dev, "acin_v"); if (IS_ERR(power->acin_v)) { if (PTR_ERR(power->acin_v) == -ENODEV) return -EPROBE_DEFER; return PTR_ERR(power->acin_v); } - power->acin_i = devm_iio_channel_get(&pdev->dev, "acin_i"); + power->acin_i = devm_iio_channel_get_sys(&pdev->dev, "acin_i"); if (IS_ERR(power->acin_i)) { if (PTR_ERR(power->acin_i) == -ENODEV) return -EPROBE_DEFER; diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c index fa27195f074e..152e556a4417 100644 --- a/drivers/power/supply/axp20x_battery.c +++ b/drivers/power/supply/axp20x_battery.c @@ -906,23 +906,23 @@ static const struct power_supply_desc axp717_batt_ps_desc = { static int axp209_bat_cfg_iio_channels(struct platform_device *pdev, struct axp20x_batt_ps *axp_batt) { - axp_batt->batt_v = devm_iio_channel_get(&pdev->dev, "batt_v"); + axp_batt->batt_v = devm_iio_channel_get_sys(&pdev->dev, "batt_v"); if (IS_ERR(axp_batt->batt_v)) { if (PTR_ERR(axp_batt->batt_v) == -ENODEV) return -EPROBE_DEFER; return PTR_ERR(axp_batt->batt_v); } - axp_batt->batt_chrg_i = devm_iio_channel_get(&pdev->dev, - "batt_chrg_i"); + axp_batt->batt_chrg_i = devm_iio_channel_get_sys(&pdev->dev, + "batt_chrg_i"); if (IS_ERR(axp_batt->batt_chrg_i)) { if (PTR_ERR(axp_batt->batt_chrg_i) == -ENODEV) return -EPROBE_DEFER; return PTR_ERR(axp_batt->batt_chrg_i); } - axp_batt->batt_dischrg_i = devm_iio_channel_get(&pdev->dev, - "batt_dischrg_i"); + axp_batt->batt_dischrg_i = devm_iio_channel_get_sys(&pdev->dev, + "batt_dischrg_i"); if (IS_ERR(axp_batt->batt_dischrg_i)) { if (PTR_ERR(axp_batt->batt_dischrg_i) == -ENODEV) return -EPROBE_DEFER; @@ -935,15 +935,15 @@ static int axp209_bat_cfg_iio_channels(struct platform_device *pdev, static int axp717_bat_cfg_iio_channels(struct platform_device *pdev, struct axp20x_batt_ps *axp_batt) { - axp_batt->batt_v = devm_iio_channel_get(&pdev->dev, "batt_v"); + axp_batt->batt_v = devm_iio_channel_get_sys(&pdev->dev, "batt_v"); if (IS_ERR(axp_batt->batt_v)) { if (PTR_ERR(axp_batt->batt_v) == -ENODEV) return -EPROBE_DEFER; return PTR_ERR(axp_batt->batt_v); } - axp_batt->batt_chrg_i = devm_iio_channel_get(&pdev->dev, - "batt_chrg_i"); + axp_batt->batt_chrg_i = devm_iio_channel_get_sys(&pdev->dev, + "batt_chrg_i"); if (IS_ERR(axp_batt->batt_chrg_i)) { if (PTR_ERR(axp_batt->batt_chrg_i) == -ENODEV) return -EPROBE_DEFER; diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c index 9722912268fe..c82f05cef379 100644 --- a/drivers/power/supply/axp20x_usb_power.c +++ b/drivers/power/supply/axp20x_usb_power.c @@ -577,14 +577,14 @@ static int axp717_usb_power_prop_writeable(struct power_supply *psy, static int axp20x_configure_iio_channels(struct platform_device *pdev, struct axp20x_usb_power *power) { - power->vbus_v = devm_iio_channel_get(&pdev->dev, "vbus_v"); + power->vbus_v = devm_iio_channel_get_sys(&pdev->dev, "vbus_v"); if (IS_ERR(power->vbus_v)) { if (PTR_ERR(power->vbus_v) == -ENODEV) return -EPROBE_DEFER; return PTR_ERR(power->vbus_v); } - power->vbus_i = devm_iio_channel_get(&pdev->dev, "vbus_i"); + power->vbus_i = devm_iio_channel_get_sys(&pdev->dev, "vbus_i"); if (IS_ERR(power->vbus_i)) { if (PTR_ERR(power->vbus_i) == -ENODEV) return -EPROBE_DEFER; @@ -597,7 +597,7 @@ static int axp20x_configure_iio_channels(struct platform_device *pdev, static int axp717_configure_iio_channels(struct platform_device *pdev, struct axp20x_usb_power *power) { - power->vbus_v = devm_iio_channel_get(&pdev->dev, "vbus_v"); + power->vbus_v = devm_iio_channel_get_sys(&pdev->dev, "vbus_v"); if (IS_ERR(power->vbus_v)) { if (PTR_ERR(power->vbus_v) == -ENODEV) return -EPROBE_DEFER; -- 2.43.0