1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/i2c.h)
4
5zephyr_library()
6
7zephyr_library_sources(i2c_common.c)
8
9zephyr_library_sources_ifdef(CONFIG_GPIO_I2C_SWITCH	gpio_i2c_switch.c)
10zephyr_library_sources_ifdef(CONFIG_I2C_BITBANG		i2c_bitbang.c)
11zephyr_library_sources_ifdef(CONFIG_I2C_EMUL		i2c_emul.c)
12zephyr_library_sources_ifdef(CONFIG_I2C_GPIO		i2c_gpio.c)
13zephyr_library_sources_ifdef(CONFIG_I2C_SHELL		i2c_shell.c)
14zephyr_library_sources_ifdef(CONFIG_I2C_RTIO
15	i2c_rtio.c
16	i2c_rtio_default.c
17)
18zephyr_library_sources_ifdef(CONFIG_I2C_TEST		i2c_test.c)
19zephyr_library_sources_ifdef(CONFIG_USERSPACE		i2c_handlers.c)
20add_subdirectory_ifdef(CONFIG_I2C_TARGET target)
21
22
23zephyr_library_sources_ifdef(CONFIG_I2C_AMBIQ		i2c_ambiq.c)
24zephyr_library_sources_ifdef(CONFIG_I2C_ANDES_ATCIIC100	i2c_andes_atciic100.c)
25zephyr_library_sources_ifdef(CONFIG_I2C_CC13XX_CC26XX	i2c_cc13xx_cc26xx.c)
26zephyr_library_sources_ifdef(CONFIG_I2C_CC32XX		i2c_cc32xx.c)
27zephyr_library_sources_ifdef(CONFIG_I2C_DW		i2c_dw.c)
28zephyr_library_sources_ifdef(CONFIG_I2C_ENE_KB1200	i2c_ene_kb1200.c)
29zephyr_library_sources_ifdef(CONFIG_I2C_ESP32		i2c_esp32.c)
30zephyr_library_sources_ifdef(CONFIG_I2C_GD32		i2c_gd32.c)
31zephyr_library_sources_ifdef(CONFIG_I2C_GECKO		i2c_gecko.c)
32zephyr_library_sources_ifdef(CONFIG_I2C_IMX		i2c_imx.c)
33zephyr_library_sources_ifdef(CONFIG_I2C_IPROC		i2c_bcm_iproc.c)
34zephyr_library_sources_ifdef(CONFIG_I2C_INFINEON_CAT1	i2c_ifx_cat1.c)
35zephyr_library_sources_ifdef(CONFIG_I2C_INFINEON_XMC4	i2c_ifx_xmc4.c)
36zephyr_library_sources_ifdef(CONFIG_I2C_ITE_IT8XXX2	i2c_ite_it8xxx2.c)
37zephyr_library_sources_ifdef(CONFIG_I2C_ITE_ENHANCE	i2c_ite_enhance.c)
38zephyr_library_sources_ifdef(CONFIG_I2C_LITEX		i2c_litex.c)
39zephyr_library_sources_ifdef(CONFIG_I2C_LPC11U6X	i2c_lpc11u6x.c)
40zephyr_library_sources_ifdef(CONFIG_I2C_MCHP_MSS	i2c_mchp_mss.c)
41zephyr_library_sources_ifdef(CONFIG_I2C_MCUX		i2c_mcux.c)
42zephyr_library_sources_ifdef(CONFIG_I2C_MCUX_FLEXCOMM	i2c_mcux_flexcomm.c)
43if(CONFIG_I2C_RTIO)
44  zephyr_library_sources_ifdef(CONFIG_I2C_MCUX_LPI2C	i2c_mcux_lpi2c_rtio.c)
45else()
46  zephyr_library_sources_ifdef(CONFIG_I2C_MCUX_LPI2C	i2c_mcux_lpi2c.c)
47endif()
48zephyr_library_sources_ifdef(CONFIG_I2C_NIOS2		i2c_nios2.c)
49zephyr_library_sources_ifdef(CONFIG_I2C_NPCX		i2c_npcx_controller.c)
50zephyr_library_sources_ifdef(CONFIG_I2C_NPCX		i2c_npcx_port.c)
51if(CONFIG_I2C_RTIO)
52	zephyr_library_sources_ifdef(CONFIG_I2C_NRFX_TWI
53		i2c_nrfx_twi_rtio.c
54		i2c_nrfx_twi_common.c
55	)
56	zephyr_library_sources_ifdef(CONFIG_I2C_NRFX_TWIM
57		i2c_nrfx_twim_rtio.c
58		i2c_nrfx_twim_common.c
59	)
60else()
61	zephyr_library_sources_ifdef(CONFIG_I2C_NRFX_TWI
62		i2c_nrfx_twi.c
63		i2c_nrfx_twi_common.c
64	)
65	zephyr_library_sources_ifdef(CONFIG_I2C_NRFX_TWIM
66		i2c_nrfx_twim.c
67		i2c_nrfx_twim_common.c
68	)
69endif()
70zephyr_library_sources_ifdef(CONFIG_I2C_NRFX_TWIS	i2c_nrfx_twis.c)
71zephyr_library_sources_ifdef(CONFIG_I2C_NUMAKER		i2c_numaker.c)
72zephyr_library_sources_ifdef(CONFIG_I2C_SAM_TWI		i2c_sam_twi.c)
73if(CONFIG_I2C_RTIO)
74	zephyr_library_sources_ifdef(CONFIG_I2C_SAM_TWIHS
75		i2c_sam_twihs_rtio.c
76	)
77else()
78	zephyr_library_sources_ifdef(CONFIG_I2C_SAM_TWIHS
79		i2c_sam_twihs.c
80	)
81endif()
82if(CONFIG_I2C_RTIO)
83	zephyr_library_sources_ifdef(CONFIG_I2C_MAX32	i2c_max32_rtio.c)
84else()
85	zephyr_library_sources_ifdef(CONFIG_I2C_MAX32	i2c_max32.c)
86endif()
87zephyr_library_sources_ifdef(CONFIG_I2C_SAM_TWIM	i2c_sam4l_twim.c)
88zephyr_library_sources_ifdef(CONFIG_I2C_SAM0		i2c_sam0.c)
89zephyr_library_sources_ifdef(CONFIG_I2C_SBCON		i2c_sbcon.c)
90zephyr_library_sources_ifdef(CONFIG_I2C_SC18IM704	i2c_sc18im704.c)
91zephyr_library_sources_ifdef(CONFIG_I2C_SEDI		i2c_sedi.c)
92zephyr_library_sources_ifdef(CONFIG_I2C_SIFIVE		i2c_sifive.c)
93zephyr_library_sources_ifdef(CONFIG_I2C_SMARTBOND	i2c_smartbond.c)
94zephyr_library_sources_ifdef(CONFIG_I2C_STM32_V1
95	i2c_ll_stm32_v1.c
96	i2c_ll_stm32.c
97)
98zephyr_library_sources_ifdef(CONFIG_I2C_STM32_V2
99	i2c_ll_stm32_v2.c
100	i2c_ll_stm32.c
101)
102zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RA_IIC	i2c_renesas_ra_iic.c)
103zephyr_library_sources_ifdef(CONFIG_I2C_RCAR		i2c_rcar.c)
104zephyr_library_sources_ifdef(CONFIG_I2C_RV32M1_LPI2C	i2c_rv32m1_lpi2c.c)
105zephyr_library_sources_ifdef(CONFIG_I2C_TCA954X		i2c_tca954x.c)
106zephyr_library_sources_ifdef(CONFIG_I2C_TELINK_B91	i2c_b91.c)
107zephyr_library_sources_ifdef(CONFIG_I2C_XEC		i2c_mchp_xec.c)
108zephyr_library_sources_ifdef(CONFIG_I2C_XEC_V2		i2c_mchp_xec_v2.c)
109zephyr_library_sources_ifdef(CONFIG_I2C_XILINX_AXI	i2c_xilinx_axi.c)
110