Skip to content

Commit f2c4266

Browse files
GTLin08MaureenHelm
authored andcommitted
ITE: drivers/i2c: I2C driver divided into two compatibles
As mentioned in #42882, the I2C of IT8XXX2 is designed for two different IP blocks, so this PR divides this I2C driver into two compatibles. Signed-off-by: Tim Lin <[email protected]>
1 parent f18decd commit f2c4266

File tree

15 files changed

+1211
-739
lines changed

15 files changed

+1211
-739
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
/drivers/hwinfo/ @alexanderwachter
279279
/drivers/i2c/i2c_common.c @sjg20
280280
/drivers/i2c/i2c_emul.c @sjg20
281+
/drivers/i2c/i2c_ite_enhance.c @GTLin08
281282
/drivers/i2c/i2c_ite_it8xxx2.c @GTLin08
282283
/drivers/i2c/i2c_shell.c @nashif
283284
/drivers/i2c/Kconfig.i2c_emul @sjg20

drivers/i2c/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_CC32XX i2c_cc32xx.c)
1111
zephyr_library_sources_ifdef(CONFIG_I2C_ESP32 i2c_esp32.c)
1212
zephyr_library_sources_ifdef(CONFIG_I2C_GPIO i2c_gpio.c)
1313
zephyr_library_sources_ifdef(CONFIG_I2C_ITE_IT8XXX2 i2c_ite_it8xxx2.c)
14+
zephyr_library_sources_ifdef(CONFIG_I2C_ITE_ENHANCE i2c_ite_enhance.c)
1415
zephyr_library_sources_ifdef(CONFIG_I2C_IMX i2c_imx.c)
1516
zephyr_library_sources_ifdef(CONFIG_I2C_LPC11U6X i2c_lpc11u6x.c)
1617
zephyr_library_sources_ifdef(CONFIG_I2C_XEC i2c_mchp_xec.c)

drivers/i2c/Kconfig.it8xxx2

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
DT_COMPAT_ITE_IT8XXX2_I2C := ite,it8xxx2-i2c
5+
DT_COMPAT_ITE_ENHANCE_I2C := ite,enhance-i2c
6+
47
config I2C_ITE_IT8XXX2
58
bool "ITE IT8XXX2 I2C driver"
69
depends on SOC_IT8XXX2
10+
default $(dt_compat_enabled,$(DT_COMPAT_ITE_IT8XXX2_I2C))
711
help
812
Enable I2C support on it8xxx2_evb.
913
Supported Speeds: 100kHz, 400kHz and 1MHz.
1014
This driver supports repeated start.
15+
16+
config I2C_ITE_ENHANCE
17+
bool "ITE IT8XXX2 I2C enhance driver"
18+
depends on SOC_IT8XXX2
19+
default $(dt_compat_enabled,$(DT_COMPAT_ITE_ENHANCE_I2C))
20+
help
21+
This option can enable the enhance I2C
22+
of IT8XXX2 and support three channels.

0 commit comments

Comments
 (0)