Skip to content

Commit

Permalink
ITE: drivers/i2c: I2C driver divided into two compatibles
Browse files Browse the repository at this point in the history
As mentioned in zephyrproject-rtos#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]>
  • Loading branch information
GTLin08 authored and MaureenHelm committed Mar 17, 2022
1 parent f18decd commit f2c4266
Show file tree
Hide file tree
Showing 15 changed files with 1,211 additions and 739 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
/drivers/hwinfo/ @alexanderwachter
/drivers/i2c/i2c_common.c @sjg20
/drivers/i2c/i2c_emul.c @sjg20
/drivers/i2c/i2c_ite_enhance.c @GTLin08
/drivers/i2c/i2c_ite_it8xxx2.c @GTLin08
/drivers/i2c/i2c_shell.c @nashif
/drivers/i2c/Kconfig.i2c_emul @sjg20
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_CC32XX i2c_cc32xx.c)
zephyr_library_sources_ifdef(CONFIG_I2C_ESP32 i2c_esp32.c)
zephyr_library_sources_ifdef(CONFIG_I2C_GPIO i2c_gpio.c)
zephyr_library_sources_ifdef(CONFIG_I2C_ITE_IT8XXX2 i2c_ite_it8xxx2.c)
zephyr_library_sources_ifdef(CONFIG_I2C_ITE_ENHANCE i2c_ite_enhance.c)
zephyr_library_sources_ifdef(CONFIG_I2C_IMX i2c_imx.c)
zephyr_library_sources_ifdef(CONFIG_I2C_LPC11U6X i2c_lpc11u6x.c)
zephyr_library_sources_ifdef(CONFIG_I2C_XEC i2c_mchp_xec.c)
Expand Down
12 changes: 12 additions & 0 deletions drivers/i2c/Kconfig.it8xxx2
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

DT_COMPAT_ITE_IT8XXX2_I2C := ite,it8xxx2-i2c
DT_COMPAT_ITE_ENHANCE_I2C := ite,enhance-i2c

config I2C_ITE_IT8XXX2
bool "ITE IT8XXX2 I2C driver"
depends on SOC_IT8XXX2
default $(dt_compat_enabled,$(DT_COMPAT_ITE_IT8XXX2_I2C))
help
Enable I2C support on it8xxx2_evb.
Supported Speeds: 100kHz, 400kHz and 1MHz.
This driver supports repeated start.

config I2C_ITE_ENHANCE
bool "ITE IT8XXX2 I2C enhance driver"
depends on SOC_IT8XXX2
default $(dt_compat_enabled,$(DT_COMPAT_ITE_ENHANCE_I2C))
help
This option can enable the enhance I2C
of IT8XXX2 and support three channels.
Loading

0 comments on commit f2c4266

Please sign in to comment.