Hi, On Fri, Apr 14, 2017 at 08:32:59PM +0200, Hans de Goede wrote: > On the exynos4412-trats2 the max77693 is used together with a > max17047 fuel-gauge. exynos4412-trats2 is DT based, so it should use the method described in Documentation/devicetree/bindings/power/supply/power_supply.txt to describe the supply chain. -- Sebastian > Add supplied_to info containing "main-battery", > so that the get_status code in the max17042_battery driver can use > power_supply_am_i_supplied and can properly let userspace know > if the battery is being charged or not. > > Signed-off-by: Hans de Goede > Reviewed-by: Krzysztof Kozlowski > --- > drivers/power/supply/max77693_charger.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/power/supply/max77693_charger.c b/drivers/power/supply/max77693_charger.c > index 6c78884..1eeed26 100644 > --- a/drivers/power/supply/max77693_charger.c > +++ b/drivers/power/supply/max77693_charger.c > @@ -254,6 +254,10 @@ static int max77693_charger_get_property(struct power_supply *psy, > return ret; > } > > +static char *max77693_charger_supplied_to[] = { > + "main-battery", > +}; > + > static const struct power_supply_desc max77693_charger_desc = { > .name = MAX77693_CHARGER_NAME, > .type = POWER_SUPPLY_TYPE_BATTERY, > @@ -697,6 +701,8 @@ static int max77693_charger_probe(struct platform_device *pdev) > if (ret) > return ret; > > + psy_cfg.supplied_to = max77693_charger_supplied_to; > + psy_cfg.num_supplicants = ARRAY_SIZE(max77693_charger_supplied_to), > psy_cfg.drv_data = chg; > > ret = device_create_file(&pdev->dev, &dev_attr_fast_charge_timer);