Skip to content
Commit a22b41a3 authored by Olof Johansson's avatar Olof Johansson Committed by Anton Vorontsov
Browse files

sbs-battery: Probe should try talking to the device



Turns out this driver doesn't actually try talking to the device at
probe time, so if it's incorrectly configured in the device tree or
platform data (or if the battery has been removed from the system),
then probe will succeed and every access will sit there and time out.
The end result is a possibly laggy system that thinks it has a battery
but can never read status, which isn't very useful.

Instead, just read any register (I chose status) at probe, and if that
fails, don't register the device.

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarRhyland Klein <rklein@nvidia.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 1502cfe1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment