max17042: propagate of_node to power supply device
authorPierre Bourdon <delroth@google.com>
Tue, 20 Feb 2018 15:03:18 +0000 (16:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:34 +0000 (07:52 +0200)
commit8ba9b0300c18e3d3863c3173230c297c14c80191
tree9bcc621f3ba73efc76b5054c1bac3b0cf51fcb0f
parented6244e8b280d87f71592a81b00be75502df02b7
max17042: propagate of_node to power supply device

[ Upstream commit 66ec32fc7cd116dab5c02603ea8ec28ff92da3b5 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/supply/max17042_battery.c