diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2021-08-23 15:29:01 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-10 19:07:02 +0000 |
commit | 26c236e3cbaad22c24b3ee8b976223524fa16421 (patch) | |
tree | 5c5d1c874297d366f7b858cc995ab6fbd9d39bc3 /driver/ioexpander/it8801.c | |
parent | 316b2b4456aa78d986b675dabe547b73c59a7097 (diff) | |
download | chrome-ec-26c236e3cbaad22c24b3ee8b976223524fa16421.tar.gz |
ioex: it8801: Support multiple I2C addresses
To avoid the I2C address contention between multiple I2C devices
on same bus, added code to support multiple I2C addresses for
it8801 I/O expander.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I6985973f9ae3ce91383d3b568a851169e6a308af
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115426
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Li Feng <li1.feng@intel.com>
Diffstat (limited to 'driver/ioexpander/it8801.c')
-rw-r--r-- | driver/ioexpander/it8801.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/driver/ioexpander/it8801.c b/driver/ioexpander/it8801.c index ebe1809f18..165e88f1df 100644 --- a/driver/ioexpander/it8801.c +++ b/driver/ioexpander/it8801.c @@ -22,14 +22,14 @@ static int it8801_ioex_set_level(int ioex, int port, int mask, int value); static int it8801_read(int reg, int *data) { - return i2c_read8(I2C_PORT_IO_EXPANDER_IT8801, IT8801_I2C_ADDR, - reg, data); + return i2c_read8(IT8801_KEYBOARD_PWM_I2C_PORT, + IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS, reg, data); } static int it8801_write(int reg, int data) { - return i2c_write8(I2C_PORT_IO_EXPANDER_IT8801, IT8801_I2C_ADDR, - reg, data); + return i2c_write8(IT8801_KEYBOARD_PWM_I2C_PORT, + IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS, reg, data); } struct it8801_vendor_id_t { |