aboutsummaryrefslogtreecommitdiff
path: root/include/linux/compiler_attributes.h
diff options
context:
space:
mode:
authorArthur Demchenkov <[email protected]>2021-01-10 21:54:00 +0200
committerSebastian Reichel <[email protected]>2021-01-14 23:42:42 +0100
commitfaf6e9008114f105353f7b8391efdda40633adf9 (patch)
treebb92f4830f898eaaf86e853cfaf39fac96d20fd8 /include/linux/compiler_attributes.h
parent4fb0357c6d57bc8c6fc517e66ece290965e73b11 (diff)
power: supply: cpcap-battery: Keep track of state for capacity reporting
Save the battery empty and full states so we can use those to estimate the battery capacity in the following patches. If the user provides us with charge_full value (which it could save in a permanent storage between reboots), initialize low and high counter_uah with calculated values. If we hit battery low once, we should stick on reporting it until the charger is connected. This way low->counter_uah will be updated properly, and that will allow us to get more accurate charge_full value. Based on an earlier patch by Tony Lindgren with charge_full usage and other improvments done by Arthur Demchenkov. Cc: Arthur Demchenkov <[email protected]> Cc: Carl Philipp Klemm <[email protected]> Cc: Merlijn Wajer <[email protected]> Cc: Pavel Machek <[email protected]> Co-developed-by: Tony Lindgren <[email protected]> Signed-off-by: Arthur Demchenkov <[email protected]> [[email protected]: combined earlier patches, updated comments] Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'include/linux/compiler_attributes.h')
0 files changed, 0 insertions, 0 deletions