zephyr/drivers/i2c
Mulin Chao b1214ead19 driver: i2c: npcx: simplify smb bank registers with union
For NPCX SMB/I2C SMB modules in FIFO mode, the registers include:

* Common registers, offset 0x00-0x0f, accessible regardless of the value
  of BNK_SEL
* Bank 0 registers, offset 0x10-0x1e, accessible if BNK_SEL is set to 0
* Bank 1 registers, offset 0x10-0x1e, accessible if BNK_SEL
is set to 1

In the current driver, it uses two structures, `smb_reg` and
`smb_fifo_reg`, to access `Common + Bank 0` and `Common + Bank 1`
registers. But It might be easy to misunderstand that they are two
different modules.

This CL tries to simplify this by the following steps:

1. Use `union` to combine `Bank 0/1` registers in the same structure.
2. Remove `smb_fifo_reg`. We needn't use two structures to present
   SMB registers.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-01-11 09:40:36 +01:00
..
target i2c: Update API terminology 2022-06-29 17:51:31 +02:00
CMakeLists.txt drivers: i2c: add Andes atciic100 driver 2022-09-01 10:29:12 +02:00
i2c-priv.h drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
i2c_andes_atciic100.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_andes_atciic100.h drivers: i2c: add Andes atciic100 driver 2022-09-01 10:29:12 +02:00
i2c_b91.c i2c: Update API terminology 2022-06-29 17:51:31 +02:00
i2c_bitbang.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
i2c_bitbang.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
i2c_cc13xx_cc26xx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_cc32xx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_common.c i2c: Print more flags for i2c_dump 2022-09-09 10:13:12 -05:00
i2c_dw.c driver: i2c: Fix Controller Initialization 2022-12-28 10:43:34 +01:00
i2c_dw.h drivers: i2c_dw: Convert to use dynamic BDF lookup 2022-11-16 11:18:43 +01:00
i2c_dw_registers.h drivers: i2c: added slave support for DW 2022-02-21 19:42:07 -05:00
i2c_emul.c emul: remove name param from bus register APIs 2022-07-19 15:52:36 -05:00
i2c_esp32.c drivers: i2c: esp32: set timeout to allow clock stretching 2022-10-31 16:41:57 +09:00
i2c_gd32.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_gecko.c soc: arm: silabs: remove soc_gpio_configure wrapper 2022-12-20 22:50:19 +01:00
i2c_gpio.c i2c: Update API terminology 2022-06-29 17:51:31 +02:00
i2c_handlers.c i2c: Update API terminology 2022-06-29 17:51:31 +02:00
i2c_imx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_ite_enhance.c ITE: drivers/i2c: Fix mutex bug 2022-11-03 09:01:07 +00:00
i2c_ite_it8xxx2.c ITE: drivers/i2c: Don't spam NACK error messages 2023-01-04 10:34:46 +01:00
i2c_litex.c drivers: i2c: i2c_litex: Use LiteX HAL 2022-05-27 15:27:11 -07:00
i2c_ll_stm32.c drivers: i2c: Fix clock value for STM32 I2C 2022-12-24 16:58:54 +01:00
i2c_ll_stm32.h drivers: i2c: Use dts to determine i2c clock source for STM32 2022-12-21 12:17:38 +01:00
i2c_ll_stm32_v1.c drivers: i2c: Support for i2c 10-bit addressing for STM32 target 2022-11-09 09:07:35 +00:00
i2c_ll_stm32_v2.c drivers: i2c: Support for i2c 10-bit addressing for STM32 target 2022-11-09 09:07:35 +00:00
i2c_lpc11u6x.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_lpc11u6x.h drivers: i2c: lpc11u6x: Remove DT_LABEL usage 2022-06-30 10:32:33 +02:00
i2c_mchp_xec.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_mchp_xec_v2.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_mcux.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_mcux_flexcomm.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_mcux_lpi2c.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_nios2.c include: add missing kernel.h include 2022-10-11 18:05:17 +02:00
i2c_npcx_controller.c driver: i2c: npcx: simplify smb bank registers with union 2023-01-11 09:40:36 +01:00
i2c_npcx_controller.h driver: i2c: npcx: add recover_bus API support 2022-08-30 10:26:19 +02:00
i2c_npcx_port.c driver: i2c: npcx: add recover_bus API support 2022-08-30 10:26:19 +02:00
i2c_nrfx_twi.c drivers: i2c_nrfx_twi[m]: Make transfer timeout value configurable 2022-12-10 09:46:45 +01:00
i2c_nrfx_twim.c drivers: i2c_nrfx_twi[m]: Make transfer timeout value configurable 2022-12-10 09:46:45 +01:00
i2c_rcar.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_rv32m1_lpi2c.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_sam0.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_sam4l_twim.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_sam_twi.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_sam_twihs.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
i2c_sbcon.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
i2c_shell.c i2c_shell: add command to configure bus speed 2022-10-20 16:02:32 +02:00
i2c_sifive.c i2c: Update API terminology 2022-06-29 17:51:31 +02:00
i2c_tca954x.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
i2c_test.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
Kconfig i2c: shell: Update outdated help 2022-09-07 16:04:39 -04:00
Kconfig.andes_atciic100 drivers: i2c: add Andes atciic100 driver 2022-09-01 10:29:12 +02:00
Kconfig.b91 drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.cc13xx_cc26xx drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.dw i2c: Remove unncessary HAS_I2C_DW Kconfig symbol 2022-08-01 18:01:44 +02:00
Kconfig.esp32 drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.gd32 drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.gpio drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.i2c_emul drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.it8xxx2 ITE: drivers/i2c: FIFO2 can be selected to support channel of B or C 2022-09-22 14:58:42 +00:00
Kconfig.litex drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.lpc11u6x drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.npcx drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.nrfx drivers: i2c_nrfx_twi[m]: Make transfer timeout value configurable 2022-12-10 09:46:45 +01:00
Kconfig.rcar drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.sam0 drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.sbcon drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.sifive drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.stm32 drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.tca954x drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.test drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00
Kconfig.xec drivers: i2c: Update drivers to use devicetree Kconfig symbol 2022-07-28 16:12:43 -05:00