mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
Virtual battery implements a smart battery interface, but the actual battery on the system may speak a different protocol. Support such batteries by removing direct i2c access from the virtual battery driver. Fetch data from storage when available, and call generic battery routines when not. BUG=chromium:717753 BRANCH=None TEST=Manual on kevin, boot and verify "Unhandled VB reg" prints are not seen. Verify by-eye that all regs in cros 4.4 kernel sbs-battery.c are handled (except REG_MANUFACTURER_DATA). Verify that sysfs manufacturer, model name, time_to_full_avg and time_to_empty_avg values are all sane. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ia8fc0a80ac7576fa8bdcc3b7dac0609d9d754234 Reviewed-on: https://chromium-review.googlesource.com/547004 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
7.5 KiB
7.5 KiB