[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2264396.HPVdm0XNkV@pliszka>
Date: Wed, 25 Nov 2020 05:44:44 +0100
From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>
To: Sebastian Reichel <sre@...nel.org>
Cc: Geordan Neukum <gneukum1@...il.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...i.sm
Subject: [PATCH 1/4] power: max17042_battery: Fix current_{avg,now} hiding with no current sense
When current sense is disabled, max17042_no_current_sense_psy_desc gets
used which ignores two last properties from the list.
Fixes: 21b01cc879cc ("power: supply: max17042_battery: Add support for the TTE_NOW prop")
Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>
---
drivers/power/supply/max17042_battery.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index f284547913d6..2e9672fe4df1 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -85,9 +85,10 @@ 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,
+ // these two have to be at the end on the list
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.29.2
Powered by blists - more mailing lists