diff options
author | Pierre Bourdon <delroth@google.com> | 2018-02-20 10:03:18 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2018-03-12 09:29:52 -0400 |
commit | 66ec32fc7cd116dab5c02603ea8ec28ff92da3b5 (patch) | |
tree | b8f23facbbc9d7a1a5610af53f546b86a8febeca | |
parent | 4a9be940551ab664918ac089b92c47d74e6cb8e7 (diff) |
max17042: propagate of_node to power supply device
max17042_get_status uses the core power_supply_am_i_supplied. That
function relies on DT properties to figure out the power supply
topology, and will error out without DT.
Fixes max17042 battery status being reported as "unknown".
Signed-off-by: Pierre Bourdon <delroth@google.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
-rw-r--r-- | drivers/power/supply/max17042_battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index 35dde81b1c9b..1a568df383db 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c | |||
@@ -1053,6 +1053,7 @@ static int max17042_probe(struct i2c_client *client, | |||
1053 | 1053 | ||
1054 | i2c_set_clientdata(client, chip); | 1054 | i2c_set_clientdata(client, chip); |
1055 | psy_cfg.drv_data = chip; | 1055 | psy_cfg.drv_data = chip; |
1056 | psy_cfg.of_node = dev->of_node; | ||
1056 | 1057 | ||
1057 | /* When current is not measured, | 1058 | /* When current is not measured, |
1058 | * CURRENT_NOW and CURRENT_AVG properties should be invisible. */ | 1059 | * CURRENT_NOW and CURRENT_AVG properties should be invisible. */ |