diff options
author | Caveh Jalali <caveh@google.com> | 2017-08-02 15:58:41 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-03 19:23:13 -0700 |
commit | 10dab9c7dd2068876c204d5fcdb7c5de522f3003 (patch) | |
tree | a6a238fff558253acc37a570448bad82248184be /util | |
parent | 28bfc8037156ba0f9c8189ef6e8b7c8a7d22d4cc (diff) | |
download | chrome-ec-10dab9c7dd2068876c204d5fcdb7c5de522f3003.tar.gz |
ectool: add PD_CHIP_ON support.
this adds CLI support for the new PD_CHIP_ON subcommand of
ec_pd_control_cmd.
TEST=rebuilt ectool to see if "ectool pdcontrol on" does something useful.
copied new build to electro:
ec> i2cxfer rlen 0 0x50 1 0x10
Unknown error
Usage: i2cxfer r/r16/rlen/w/w16 port addr offset [value | len]
ec>
ap$ /tmp/ectool pdcontrol on 0
ec> i2cxfer rlen 0 0x50 1 0x10
Data: aa2934ad000000000000010000050500
ec>
so, "pdcontrol on" had the desired effect of bringing the chip
out of sleep mode.
BRANCH=none
BUG=b:35586895
Change-Id: I5275254fe797dda921a352b72f1683e1967efe58
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://chromium-review.googlesource.com/599361
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c index b846f45957..0319ea858c 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -160,7 +160,7 @@ const char help_str[] = " Prints saved panic info\n" " pause_in_s5 [on|off]\n" " Whether or not the AP should pause in S5 on shutdown\n" - " pdcontrol [suspend|resume|reset|disable]\n" + " pdcontrol [suspend|resume|reset|disable|on]\n" " Controls the PD chip\n" " pdchipinfo <port>\n" " Get PD chip information\n" @@ -7048,6 +7048,8 @@ int cmd_pd_control(int argc, char *argv[]) p.subcmd = PD_RESUME; else if (!strcmp(argv[1], "disable")) p.subcmd = PD_CONTROL_DISABLE; + else if (!strcmp(argv[1], "on") || !strcmp(argv[1], "chip_on")) + p.subcmd = PD_CHIP_ON; else { fprintf(stderr, "Unknown command: %s\n", argv[1]); return -1; |