diff options
| author | Alexey Charkov <alchark@flipper.net> | 2026-06-02 23:10:53 +0300 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2026-06-03 23:44:32 +0300 |
| commit | 5d543bf02965d1c04064acfd5e97d1529268d86f (patch) | |
| tree | 5b7c0a004d6405e1b1cb4f722c875d9150210178 /include | |
| parent | 528058841022e1bbe468b2246d4fc318881cf1cb (diff) | |
| download | linux-5d543bf02965d1c04064acfd5e97d1529268d86f.tar.xz | |
power: supply: bq257xx: Add fields for 'charging' and 'overvoltage' states
The driver currently reports the 'charging' and 'overvoltage' states based
on a logical expression in the get_charger_property() wrapper function.
This doesn't scale well to other chip variants, which may have a different
number and type of hardware reported conditions which fall into these
broad power supply states.
Move the logic for determining 'charging' and 'overvoltage' states into
chip-specific accessors, which can be overridden by each variant as
needed.
This helps keep the get_charger_property() wrapper function chip-agnostic
while allowing for new chip variants to be added bringing their own logic.
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Link: https://patch.msgid.link/20260603-bq25792-v7-5-d487bed276d0@flipper.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
