diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2021-10-15 17:36:28 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-19 02:02:47 +0000 |
commit | 814bde1b0af78e4059397a0ef3ab1fc5304d4908 (patch) | |
tree | ba6807e3d1d84fc71113fdb911f9072fd6af477d | |
parent | 67b59415556e76c453d22125ad5640029efa0cd3 (diff) | |
download | chrome-ec-814bde1b0af78e4059397a0ef3ab1fc5304d4908.tar.gz |
dps: reset PD voltage when dps disabled.
To enforce the PD voltage back to the default value, we have
to force a new request.
BUG=b:169532537
TEST=dps dis, and a new PD request is issued
BRANCH=asurada
Change-Id: I4c7d1d6019a9095099dc992411890e394c71b820
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229048
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Tested-by: Eric Yilun Lin <yllin@google.com>
-rw-r--r-- | common/dps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/dps.c b/common/dps.c index 235f4d4e08..b627bce90d 100644 --- a/common/dps.c +++ b/common/dps.c @@ -558,6 +558,9 @@ static int command_dps(int argc, char **argv) return EC_SUCCESS; } else if (!strcasecmp(argv[1], "dis")) { dps_enable(false); + /* issue a new PD request for a default voltage */ + if (dps_port != CHARGE_PORT_NONE) + pd_dpm_request(dps_port, DPM_REQUEST_NEW_POWER_LEVEL); return EC_SUCCESS; } else if (!strcasecmp(argv[1], "fakepwr")) { if (argc == 2) { |