linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] power: supply: max17042_battery: Reorder power supply properties
@ 2020-11-19 21:32 Timon Baetz
  0 siblings, 0 replies; only message in thread
From: Timon Baetz @ 2020-11-19 21:32 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Geordan Neukum, Timon Baetz, linux-pm, linux-kernel

Commit 21b01cc879cc ("power: supply: max17042_battery: Add support for
the TTE_NOW prop") added a new property (TIME_TO_EMPTY_NOW) at end of
max17042_battery_props.

Reorder max17042_battery_props to properly ignore CURRENT_NOW and
CURRENT_AVG when current sense is disabled.

Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
---
 drivers/power/supply/max17042_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index f284547913d6..672c75639a37 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -85,9 +85,9 @@ static enum power_supply_property max17042_battery_props[] = {
 	POWER_SUPPLY_PROP_TEMP_MAX,
 	POWER_SUPPLY_PROP_HEALTH,
 	POWER_SUPPLY_PROP_SCOPE,
+	POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
 	POWER_SUPPLY_PROP_CURRENT_NOW,
 	POWER_SUPPLY_PROP_CURRENT_AVG,
-	POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
 };
 
 static int max17042_get_temperature(struct max17042_chip *chip, int *temp)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-19 21:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 21:32 [PATCH] power: supply: max17042_battery: Reorder power supply properties Timon Baetz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).