diff options
author | Jan Dabros <jsd@semihalf.com> | 2020-10-26 08:12:47 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-12 22:30:02 +0000 |
commit | 9d6969f0f669da3a367bc8c2da7f65734759b4e4 (patch) | |
tree | 0a85ce5499f788e4a7fa63b558d1ed39879ad97d /board/servo_v4p1/board.c | |
parent | d3ce1d065e682b2afe6868a485942a57b2415553 (diff) | |
download | chrome-ec-9d6969f0f669da3a367bc8c2da7f65734759b4e4.tar.gz |
i2c_master: Add i2cxfer raw command
GL3590 USB3.1 hub has i2c interface, which behaves different from
majority of i2c slaves. While write operation is the same, this chip
doesn't support repeated-start sequence for reads.
New command allows to create i2c frames in a more flexible way. User may
specify how many (if any) bytes to write and then how many bytes to
read.
Since the raw option is for debugging and won't be commonly used,
do not include it by default to save space on flash -
use #define CONFIG_CMD_I2C_XFER_RAW built with the raw option.
For now, it will be defined only for servo_v4p1.
BUG=b:150323106
BRANCH=master
TEST=buildall.
Verify that reading i2c data from non-gl3590 devices is not
affected by this change.
For usual write16 (0x0201) at offset 0x4 from device 0x24:
i2cxfer raw 1 0x24 0 0x4 0x1 0x2.
When reading from GL3590 device, two operations will be required:
i2cxfer raw 1 0x50 0 0x10
i2cxfer raw 1 0x50 8
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: Ifd9ee5184490eb8de383c9468b0152e6f993d7c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505780
Reviewed-by: Brian Nemec <bnemec@chromium.org>
Commit-Queue: Brian Nemec <bnemec@chromium.org>
Tested-by: Brian Nemec <bnemec@chromium.org>
Diffstat (limited to 'board/servo_v4p1/board.c')
0 files changed, 0 insertions, 0 deletions