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>
The DMA buffer needs to be used both for tx and rx if required.
Extend RTIO driver variant to use DMA buffer and copy received
data from it to user buffer.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The buffer used for the TWIM DMA needs to be allocated to the
section provided with the memory-regions dt prop. The macros for
doing this where malformed. This commit fixes and cleans up the
macros.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
RTIO correctly declares tx buffers as const, however, the
existing I2C API and NRFX (SDK) drivers don't. Therefor cast the
const buf to non-const when passing the tx buf to the twim driver
from the RTIO call to avoid the const warning.
The tx buffer is being treated as const data naturally in the
NRFX driver, its just not declared as such since we reuse the
buffer for both RX and TX data.
Alternatively the SDK and "shim" drivers built on top of it need
to be updated, which is quite a bit of work :)
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Mark the I2C instances as `PM_DEVICE_ISR_SAFE`, as the transition
operations are short, it saves RAM resources, and the spin-locking fixes
the non-atomic behaviour of the PM usage counter.
Signed-off-by: Jordan Yates <jordan@embeint.com>