commit | 7eb42afe1cffbf139f61cbc502f4a401c8260d0d | [log] [tgz] |
---|---|---|
author | Andrei Ciubotariu <[email protected]> | Mon Jun 03 23:23:40 2024 -0700 |
committer | Cherrypicker Worker QA <[email protected]> | Thu Jun 13 19:39:00 2024 +0000 |
tree | 82d0f492d97b6e0d6689334cb13a95dfe0c2b7b8 | |
parent | ac6f42977c578583523cb5e3c01f7407a4032040 [diff] |
sw5100_bms: Return error if GBMS sets float voltage below minimum This case may happen if a device is connected to the charger with its input path suspended, since GBMS will send -1 as the float voltage value to sw5100_bms. sw5100_bms will set the value to the minimum supported value, which is 3.6V. If VBAT is significantly higher, the 3.6V setting may cause electrical backfeed. Thus, instead: - Leave float voltage value as-is. - Log an error. - Return -EINVAL to the caller (GBMS). Bug: 328534364 Signed-off-by: Andrei Ciubotariu <[email protected]> (cherry picked from https://partner-android-review.googlesource.com/q/commit:bb363c10da46f6c4e54c2fb20089804fda4aeea7) Merged-In: Icc082ee2ad2bccca9db7a3c0d4007b43c65ef161 Change-Id: Icc082ee2ad2bccca9db7a3c0d4007b43c65ef161