Skip to content

Commit ecbe31f

Browse files
ubiedakartben
authored andcommitted
drivers: i2c_nrfx_twi_rtio: Fix missing completion on i2c_configure
This patch adds the missing completion call to the RTIO_OP_I2C_CONFIGURE OPs. Without this, the drivers will lock when calling i2c_configure(). Signed-off-by: Luis Ubieda <luisf@croxel.com>
1 parent f68eefa commit ecbe31f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/i2c/i2c_nrfx_twi_rtio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ static bool i2c_nrfx_twi_rtio_start(const struct device *dev)
8080
sqe->tx.buf_len, dt_spec->addr);
8181
case RTIO_OP_I2C_CONFIGURE:
8282
(void)i2c_nrfx_twi_configure(dev, sqe->i2c_config);
83-
return false;
83+
/** This request will not generate an event therefore, this
84+
* code immediately submits a CQE in order to unblock
85+
* i2c_rtio_configure.
86+
*/
87+
return i2c_rtio_complete(ctx, 0);
8488
case RTIO_OP_I2C_RECOVER:
8589
(void)i2c_nrfx_twi_recover_bus(dev);
8690
return false;

drivers/i2c/i2c_nrfx_twim_rtio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ static bool i2c_nrfx_twim_rtio_start(const struct device *dev)
100100
dt_spec->addr);
101101
case RTIO_OP_I2C_CONFIGURE:
102102
(void)i2c_nrfx_twim_configure(dev, sqe->i2c_config);
103-
return false;
103+
/** This request will not generate an event therefore, this
104+
* code immediately submits a CQE in order to unblock
105+
* i2c_rtio_configure.
106+
*/
107+
return i2c_rtio_complete(ctx, 0);
104108
case RTIO_OP_I2C_RECOVER:
105109
(void)i2c_nrfx_twim_recover_bus(dev);
106110
return false;

0 commit comments

Comments
 (0)