diff options
author | Caveh Jalali <caveh@chromium.org> | 2021-09-21 17:14:46 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-01 22:25:16 +0000 |
commit | 0a807638423e72032e0e4e21f0dfa0059a9e94a6 (patch) | |
tree | c3c5cb35947ebc024fc27cac785ddd27750f6818 /util/ectool.h | |
parent | 70b07f8504ba32ace9292b36e0bc22fa2319c4e9 (diff) | |
download | chrome-ec-0a807638423e72032e0e4e21f0dfa0059a9e94a6.tar.gz |
ectool: Implement I2C speed control command
This adds the new "i2cspeed" command. The command takes an I2C port
(bus) number as an argument. Without a 2nd argument, the current I2C
speed is reported. If a 2nd argument is given, the I2C bus speed
accordingly, the unit is assumed to be Kbps. In practice, only 3 speeds
are supported: 100, 400, 1000 kHz.
BRANCH=none
BUG=b:201039003
TEST=with follow-on patches, switched I2C bus speed between 400 kHz
and 1 MHz using ectool.
Change-Id: I80cd436c85c368f13357a4a80c3179e1fb483cb1
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3181508
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'util/ectool.h')
-rw-r--r-- | util/ectool.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/ectool.h b/util/ectool.h index a0cc0c72a0..c76e1652cc 100644 --- a/util/ectool.h +++ b/util/ectool.h @@ -46,5 +46,6 @@ extern int ascii_mode; int cmd_i2c_protect(int argc, char *argv[]); int cmd_i2c_read(int argc, char *argv[]); +int cmd_i2c_speed(int argc, char *argv[]); int cmd_i2c_write(int argc, char *argv[]); int cmd_i2c_xfer(int argc, char *argv[]); |