[PATCHv2 1/2] i2c: stm32f7: fix clearing the control register

Patrick DELAUNAY patrick.delaunay at foss.st.com
Tue Aug 30 09:43:34 CEST 2022


Hi,

On 8/15/22 16:52, Jorge Ramirez-Ortiz wrote:
> Bits should be set to 0, not 1.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge at foundries.io>
> ---
>   drivers/i2c/stm32f7_i2c.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
> index bf2a6c9b4b..3a727e68ac 100644
> --- a/drivers/i2c/stm32f7_i2c.c
> +++ b/drivers/i2c/stm32f7_i2c.c
> @@ -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;


Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>

Thanks
Patrick




More information about the U-Boot mailing list