From 506f725a19843cdeaafa2cdfffb293eaa68d5191 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 25 Oct 2023 03:34:37 -0700 Subject: [PATCH] s32k3xx:lpi2c DMA transaction only need the status conditioned With DMA enabled on some I2C channels but not all the Non DMA channels were failing. The cause was condition the status with only the enabled interrupts on non DMA chennels. This conditioning needs to only happen in DMA enabled channels --- arch/arm/src/s32k3xx/s32k3xx_lpi2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpi2c.c b/arch/arm/src/s32k3xx/s32k3xx_lpi2c.c index 517f0cf7e67..867c06397f3 100644 --- a/arch/arm/src/s32k3xx/s32k3xx_lpi2c.c +++ b/arch/arm/src/s32k3xx/s32k3xx_lpi2c.c @@ -1187,12 +1187,12 @@ static int s32k3xx_lpi2c_isr_process(struct s32k3xx_lpi2c_priv_s *priv) #ifdef CONFIG_S32K3XX_LPI2C_DMA uint32_t current_status = status; - /* Condition the status with only the enabled interrupts */ - - status &= s32k3xx_lpi2c_getenabledints(priv); - if (priv->rxdma != NULL || priv->txdma != NULL) { + /* Condition the status with only the enabled interrupts */ + + status &= s32k3xx_lpi2c_getenabledints(priv); + /* Is there an Error condition */ if (current_status & LPI2C_MSR_LIMITED_ERROR_MASK)