diff options
author | Caleb Connolly <caleb.connolly@linaro.org> | 2023-08-02 15:49:29 +0100 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-08-03 02:23:42 +0200 |
commit | 7e6311f04b41174ccc738d37dcb4b93cd4de98b0 (patch) | |
tree | 3c0a8995a2c86c96bec60d02b91c497426cd4c1e /drivers/power/supply/qcom_pmi8998_charger.c | |
parent | f57f5838c044d1554b71186d3d277619eab58d31 (diff) | |
download | lwn-7e6311f04b41174ccc738d37dcb4b93cd4de98b0.tar.gz lwn-7e6311f04b41174ccc738d37dcb4b93cd4de98b0.zip |
power: supply: qcom_pmi8998_charger: fix charger status
The INHIBIT_CHARGE status bit means the battery has reached a
pre-programmed charge limit which is some voltage offset below the
target float voltage. This should be reported as a STATUS_FULL rather
than UNKNOWN, fix it.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20230802-pmi8998-charger-fixes-v1-2-a8f1e8b84c1e@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/qcom_pmi8998_charger.c')
-rw-r--r-- | drivers/power/supply/qcom_pmi8998_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/qcom_pmi8998_charger.c b/drivers/power/supply/qcom_pmi8998_charger.c index c7ec9aeb7a64..10f4dd0caca1 100644 --- a/drivers/power/supply/qcom_pmi8998_charger.c +++ b/drivers/power/supply/qcom_pmi8998_charger.c @@ -517,9 +517,9 @@ static int smb2_get_prop_status(struct smb2_chip *chip, int *val) *val = POWER_SUPPLY_STATUS_NOT_CHARGING; return rc; case TERMINATE_CHARGE: + case INHIBIT_CHARGE: *val = POWER_SUPPLY_STATUS_FULL; return rc; - case INHIBIT_CHARGE: default: *val = POWER_SUPPLY_STATUS_UNKNOWN; return rc; |