[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180528100256.120698110@linuxfoundation.org>
Date: Mon, 28 May 2018 12:03:37 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Pierre Bourdon <delroth@...gle.com>,
Andre Heider <a.heider@...il.com>,
Sebastian Reichel <sebastian.reichel@...labora.co.uk>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.16 184/272] max17042: propagate of_node to power supply device
4.16-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pierre Bourdon <delroth@...gle.com>
[ 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@...gle.com>
Signed-off-by: Andre Heider <a.heider@...il.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.co.uk>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/power/supply/max17042_battery.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -1053,6 +1053,7 @@ static int max17042_probe(struct i2c_cli
i2c_set_clientdata(client, chip);
psy_cfg.drv_data = chip;
+ psy_cfg.of_node = dev->of_node;
/* When current is not measured,
* CURRENT_NOW and CURRENT_AVG properties should be invisible. */
Powered by blists - more mailing lists