mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
When my 15V/30W charger is plugged in scarlet, I see rt946x (the battery charger on Scarlet) asserts OVP because VBUS(15V) > VBUS_OVP(14V) defined in rt946x datasheet. So we should limit the maximal VBUS to ~13V even if the source can provide higher voltage. Meanwhile, let's replace some numbers with macros for better maintainability. BUG=b:65118519 BRANCH=none TEST=manually verify charging works with a 15V/30W PD charger Change-Id: I19b7d8297bdbab0a722c488910fd872eb1395e16 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/639927 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: David Schneider <dnschneid@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>