drivers: i2c_rtio: Use MCUX variations when using instance number
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.
Applying 49bdcd2ef2fd5c91ab36f08d29e5183df5437843 on RTIO-version.
Co-authored-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Signed-off-by: Luis Ubieda <luisf@croxel.com>
diff --git a/drivers/i2c/i2c_mcux_lpi2c_rtio.c b/drivers/i2c/i2c_mcux_lpi2c_rtio.c
index f267b7a..2337c86 100644
--- a/drivers/i2c/i2c_mcux_lpi2c_rtio.c
+++ b/drivers/i2c/i2c_mcux_lpi2c_rtio.c
@@ -280,7 +280,11 @@
struct mcux_lpi2c_data *data = dev->data;
LPI2C_Type *base = (LPI2C_Type *)DEVICE_MMIO_NAMED_GET(dev, reg_base);
+#if CONFIG_HAS_MCUX_FLEXCOMM
+ LPI2C_MasterTransferHandleIRQ(LPI2C_GetInstance(base), &data->handle);
+#else
LPI2C_MasterTransferHandleIRQ(base, &data->handle);
+#endif
}
static int mcux_lpi2c_init(const struct device *dev)