Skip to content

Commit

Permalink
drivers: i2c: i2c_nrfx_twim: Add support for new instances
Browse files Browse the repository at this point in the history
This patch intoduces new instances in TWIM SHIM for i2c driver.

(cherry picked from commit 97b351f)

Original-Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
GitOrigin-RevId: 97b351f
Change-Id: Ia963eeb3cd2f69244593d57d568116605625c50a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4962272
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
Adam Wojasinski authored and Chromeos LUCI committed Oct 23, 2023
1 parent 5a708f6 commit bef3fa0
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/i2c/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ config I2C_NRFX_TWIM
select NRFX_TWIM1 if HAS_HW_NRF_TWIM1
select NRFX_TWIM2 if HAS_HW_NRF_TWIM2
select NRFX_TWIM3 if HAS_HW_NRF_TWIM3
select NRFX_TWIM20 if HAS_HW_NRF_TWIM20
select NRFX_TWIM21 if HAS_HW_NRF_TWIM21
select NRFX_TWIM22 if HAS_HW_NRF_TWIM22
select NRFX_TWIM30 if HAS_HW_NRF_TWIM30
select NRFX_TWIM120 if HAS_HW_NRF_TWIM120
select NRFX_TWIM130 if HAS_HW_NRF_TWIM130
select NRFX_TWIM131 if HAS_HW_NRF_TWIM131
select NRFX_TWIM132 if HAS_HW_NRF_TWIM132
select NRFX_TWIM133 if HAS_HW_NRF_TWIM133
select NRFX_TWIM134 if HAS_HW_NRF_TWIM134
select NRFX_TWIM135 if HAS_HW_NRF_TWIM135
select NRFX_TWIM136 if HAS_HW_NRF_TWIM136
select NRFX_TWIM137 if HAS_HW_NRF_TWIM137

config I2C_NRFX_TRANSFER_TIMEOUT
int "Transfer timeout [ms]"
Expand Down
52 changes: 52 additions & 0 deletions drivers/i2c/i2c_nrfx_twim.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,55 @@ I2C_NRFX_TWIM_DEVICE(2);
#ifdef CONFIG_HAS_HW_NRF_TWIM3
I2C_NRFX_TWIM_DEVICE(3);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM20
I2C_NRFX_TWIM_DEVICE(20);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM21
I2C_NRFX_TWIM_DEVICE(21);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM22
I2C_NRFX_TWIM_DEVICE(22);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM30
I2C_NRFX_TWIM_DEVICE(30);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM120
I2C_NRFX_TWIM_DEVICE(120);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM130
I2C_NRFX_TWIM_DEVICE(130);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM131
I2C_NRFX_TWIM_DEVICE(131);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM132
I2C_NRFX_TWIM_DEVICE(132);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM133
I2C_NRFX_TWIM_DEVICE(133);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM134
I2C_NRFX_TWIM_DEVICE(134);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM135
I2C_NRFX_TWIM_DEVICE(135);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM136
I2C_NRFX_TWIM_DEVICE(136);
#endif

#ifdef CONFIG_HAS_HW_NRF_TWIM137
I2C_NRFX_TWIM_DEVICE(137);
#endif

0 comments on commit bef3fa0

Please sign in to comment.