mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
There is an analog temperature line on the Samus battery connector. We don't yet know what it means, but there's a pull-up on it, so if it's reading close to ADC_READ_MAX, we can probably assume there's no battery. This change says that any reading within 90% of ADC_READ_MAX means the battery pack is not present, so we can go ahead and boot without trying to wake it up first. BUG=chrome-os-partner:23449 BRANCH=none TEST=manual Connect the battery, boot. It should happen quickly. Disconnect the battery, boot. It should STILL happen quickly. Running "adc" on the EC console should show an entry for "BatteryTemp". If no battery is connected, it should read somewhere close to 4095. Change-Id: I1e41bccb2a988d34de09192ebb0a68b91b1b0b24 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174046 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>