]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: cw2015: correct time_to_empty units in sysfs
authorJan Palus <jpalus@fastmail.com>
Sat, 11 Nov 2023 22:17:04 +0000 (23:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:27:45 +0000 (15:27 -0800)
commitddd3fe99b4fa65c5cb78a6076fb4be5bff431c25
treeb06d13b7078b2150ec4f7a9b9c6d4d0208d408d1
parent559e25126c1516818352b49eea3ad55d7ff2887d
power: supply: cw2015: correct time_to_empty units in sysfs

[ Upstream commit f37669119423ca852ca855b24732f25c0737aa57 ]

RRT_ALRT register holds remaining battery time in minutes therefore it
needs to be scaled accordingly when exposing TIME_TO_EMPTY via sysfs
expressed in seconds

Fixes: b4c7715c10c1 ("power: supply: add CellWise cw2015 fuel gauge driver")
Signed-off-by: Jan Palus <jpalus@fastmail.com>
Link: https://lore.kernel.org/r/20231111221704.5579-1-jpalus@fastmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/cw2015_battery.c