linux-stable/drivers/power
Thomas Weißschuh 187c63a409 power: supply: mm8013: fix "not charging" detection
[ Upstream commit cd38a0acca ]

The charge_behaviours property is meant as a control-knob that can be
changed by the user.

Page 23 of [0] which documents the flag CHG_INH as follows:

  CHG_INH : Charge Inhibit      When the current is more than or equal to charge
                                threshold current,
                                charge inhibit temperature (upper/lower limit) :1
                                charge permission temperature or the current is
                                less than charge threshold current :0

So this is pure read-only information which is better represented as
POWER_SUPPLY_STATUS_NOT_CHARGING.

[0] https://product.minebeamitsumi.com/en/product/category/ics/battery/fuel_gauge/parts/download/__icsFiles/afieldfile/2023/07/12/1_download_01_12.pdf

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240303-power_supply-charge_behaviour_prop-v2-1-8ebb0a7c2409@weissschuh.net
Fixes: e39257cde7 ("power: supply: mm8013: Add more properties")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:17:17 -04:00
..
reset power: reset: at91: Drop '__init' from at91_wakeup_status() 2023-12-24 23:43:10 +01:00
supply power: supply: mm8013: fix "not charging" detection 2024-03-26 18:17:17 -04:00
Kconfig PM: AVS: Drop the avs directory and the corresponding Kconfig 2020-10-22 18:39:32 +02:00
Makefile PM: AVS: Drop the avs directory and the corresponding Kconfig 2020-10-22 18:39:32 +02:00