Commit ce5c251
fwk: pd: return 0 voltage when no active charge port
For commit c7d2e2c.
When no AC is connected, prev_charge_port is -1. In such cases,
cypd_get_active_port_voltage() should return 0 instead of accessing
pd_port_states[-1], since there is no valid PD voltage without AC.
BRANCH=fwk-main
BUG=PD voltage gets a non 0 value when unplugging the AC
TEST=unplug AC and check the EC log "3lv-buck update! V:0mV"
Signed-off-by: johnwc_yeh <JohnWC_Yeh@compal.com>
(cherry picked from commit 3712efbeae1a3604f02e4aa5e7223f3e3778e52a)1 parent a5f07f8 commit ce5c251
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
1400 | 1403 | | |
1401 | 1404 | | |
1402 | 1405 | | |
| |||
0 commit comments