]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: stm32f7: fix clearing the control register
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Mon, 15 Aug 2022 14:52:10 +0000 (16:52 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 15 Sep 2022 12:58:49 +0000 (14:58 +0200)
Bits should be set to 0, not 1.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/i2c/stm32f7_i2c.c

index bf2a6c9b4bdd3a1801643df1711b2ae9950fec6a..3a727e68acca74a5eeafc7f8b918d6dce4de75d8 100644 (file)
@@ -413,7 +413,7 @@ static int stm32_i2c_check_end_of_message(struct stm32_i2c_priv *i2c_priv)
                setbits_le32(&regs->icr, STM32_I2C_ICR_STOPCF);
 
                /* Clear control register 2 */
-               setbits_le32(&regs->cr2, STM32_I2C_CR2_RESET_MASK);
+               clrbits_le32(&regs->cr2, STM32_I2C_CR2_RESET_MASK);
        }
 
        return ret;