power: supply: bq27xxx: Move one time design full read out of poll
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 15:09:14 +0000 (09:09 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 27 Jan 2024 00:00:08 +0000 (01:00 +0100)
commitb282c30dad3e10738a4f03043efaff93d9e8de02
tree52d60b0c6e3d77eaae827e47a056f2484e48136d
parent7911cf971c1cbf69cb110ab83598c3c415cf2c70
power: supply: bq27xxx: Move one time design full read out of poll

This value only needs read once. Move that read into the function
that returns the value to keep the logic all in one place. This
also avoids doing this check every time we read in values in
the device update poll worker.

While here, correct this function's error message.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240123150914.308510-5-afd@ti.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq27xxx_battery.c