[PATCH v4 4/4] i2c: stm32: fix usage of rise/fall device tree properties

2022-09-12 Thread Alain Volmat
From: Jorge Ramirez-Ortiz These two device tree properties were not being applied. Fixes: 1fd9eb68d6 ("i2c: stm32f7: move driver data of each instance in a privdata") Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 11 ++- 1 fi

[PATCH v4 3/4] i2c: stm32: do not set the STOP condition on error

2022-09-12 Thread Alain Volmat
and proposing a first fix for this. [1] [1] https://lore.kernel.org/u-boot/20220815145211.31342-2-jo...@foundries.io/ Reported-by: Jorge Ramirez-Ortiz, Foundries Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 6 +++--- 1 file changed, 3 insertions

[PATCH v4 2/4] i2c: stm32: remove unused stop parameter in start & reload handling

2022-09-12 Thread Alain Volmat
Functions stm32_i2c_message_start and stm32_i2c_handle_reload both get a stop boolean indicating if the transfer should end with a STOP or not. However no specific handling is needed in those functions hence remove the parameter. Signed-off-by: Alain Volmat Reviewed-by: Patrick Delaunay

[PATCH v4 0/4] i2c: stm32: cleanup & stop handling fix

2022-09-12 Thread Alain Volmat
This series corrects the handling of the stop condition and cleanup few bits in the driver stm32f7_i2c.c v4: additional patch to fix rise/fall timing settings v3: fix stop handling in patch 3/3 v2: update commit message in patch 3/3 Alain Volmat (3): i2c: stm32: fix comment and remove unused

[PATCH v4 1/4] i2c: stm32: fix comment and remove unused AUTOEND bit

2022-09-12 Thread Alain Volmat
Comment within stm32_i2c_message_start is misleading, indicating that AUTOEND bit is setted while it is actually cleared. Moreover, the bit is actually never setted so there is no need to clear it hence get rid of this bit clear and the bit macro as well. Signed-off-by: Alain Volmat Reviewed

Re: [PATCH v2 3/3] i2c: stm32: only send a STOP upon transfer completion

2022-09-12 Thread Alain Volmat
Hi Jorge On Sun, Sep 11, 2022 at 08:57:17PM +0200, Jorge Ramirez-Ortiz, Foundries wrote: > On 09/09/22, Alain Volmat wrote: > > Hi Patrick > > > > On Fri, Sep 09, 2022 at 02:53:23PM +0200, Patrick DELAUNAY wrote: > > > Hi Alain > > > > > > On 9

[PATCH v3 3/3] i2c: stm32: do not set the STOP condition on error

2022-09-09 Thread Alain Volmat
and proposing a first fix for this. [1] [1] https://lore.kernel.org/u-boot/20220815145211.31342-2-jo...@foundries.io/ Reported-by: Jorge Ramirez-Ortiz, Foundries Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 6 +++--- 1 file changed, 3 insertions

[PATCH v3 2/3] i2c: stm32: remove unused stop parameter in start & reload handling

2022-09-09 Thread Alain Volmat
Functions stm32_i2c_message_start and stm32_i2c_handle_reload both get a stop boolean indicating if the transfer should end with a STOP or not. However no specific handling is needed in those functions hence remove the parameter. Signed-off-by: Alain Volmat Reviewed-by: Patrick Delaunay

[PATCH v3 0/3] i2c: stm32: cleanup & stop handling fix

2022-09-09 Thread Alain Volmat
This series corrects the handling of the stop condition and cleanup few bits in the driver stm32f7_i2c.c v3: fix stop handling in patch 3/3 v2: update commit message in patch 3/3 Alain Volmat (3): i2c: stm32: fix comment and remove unused AUTOEND bit i2c: stm32: remove unused stop parameter

[PATCH v3 1/3] i2c: stm32: fix comment and remove unused AUTOEND bit

2022-09-09 Thread Alain Volmat
Comment within stm32_i2c_message_start is misleading, indicating that AUTOEND bit is setted while it is actually cleared. Moreover, the bit is actually never setted so there is no need to clear it hence get rid of this bit clear and the bit macro as well. Signed-off-by: Alain Volmat Reviewed

Re: [PATCH v2 3/3] i2c: stm32: only send a STOP upon transfer completion

2022-09-09 Thread Alain Volmat
Hi Patrick On Fri, Sep 09, 2022 at 02:53:23PM +0200, Patrick DELAUNAY wrote: > Hi Alain > > On 9/8/22 12:59, Alain Volmat wrote: > > Current function stm32_i2c_message_xfer is sending a STOP > > whatever the result of the transaction is. This can cause issues > >

[PATCH v2 2/3] i2c: stm32: remove unused stop parameter in start & reload handling

2022-09-08 Thread Alain Volmat
Functions stm32_i2c_message_start and stm32_i2c_handle_reload both get a stop boolean indicating if the transfer should end with a STOP or not. However no specific handling is needed in those functions hence remove the parameter. Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 8

[PATCH v2 1/3] i2c: stm32: fix comment and remove unused AUTOEND bit

2022-09-08 Thread Alain Volmat
Comment within stm32_i2c_message_start is misleading, indicating that AUTOEND bit is setted while it is actually cleared. Moreover, the bit is actually never setted so there is no need to clear it hence get rid of this bit clear and the bit macro as well. Signed-off-by: Alain Volmat --- drivers

[PATCH v2 3/3] i2c: stm32: only send a STOP upon transfer completion

2022-09-08 Thread Alain Volmat
/20220815145211.31342-2-jo...@foundries.io/ Reported-by: Jorge Ramirez-Ortiz, Foundries Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c

[PATCH v2 0/3] i2c: stm32: cleanup & stop handling fix

2022-09-08 Thread Alain Volmat
This series corrects the handling of the stop condition and cleanup few bits in the driver stm32f7_i2c.c v2: update commit message in patch 3/3 Alain Volmat (3): i2c: stm32: fix comment and remove unused AUTOEND bit i2c: stm32: remove unused stop parameter in start & reload handling

Re: [PATCH 3/3] i2c: stm32: only send a STOP upon transfer completion

2022-09-08 Thread Alain Volmat
Hi Jorge, On Thu, Sep 08, 2022 at 10:36:22AM +0200, Jorge Ramirez-Ortiz, Foundries wrote: > On 08/09/22, Alain Volmat wrote: > > Current function stm32_i2c_message_xfer is sending a STOP > > whatever the result of the transaction is. This can cause issues > > such as maki

[PATCH 1/3] i2c: stm32: fix comment and remove unused AUTOEND bit

2022-09-08 Thread Alain Volmat
Comment within stm32_i2c_message_start is misleading, indicating that AUTOEND bit is setted while it is actually cleared. Moreover, the bit is actually never setted so there is no need to clear it hence get rid of this bit clear and the bit macro as well. Signed-off-by: Alain Volmat --- drivers

[PATCH 0/3] i2c: stm32: cleanup & stop handling fix

2022-09-08 Thread Alain Volmat
This series corrects the handling of the stop condition and cleanup few bits in the driver stm32f7_i2c.c Alain Volmat (3): i2c: stm32: fix comment and remove unused AUTOEND bit i2c: stm32: remove unused stop parameter in start & reload handling i2c: stm32: only send a STOP upon tran

[PATCH 2/3] i2c: stm32: remove unused stop parameter in start & reload handling

2022-09-08 Thread Alain Volmat
Functions stm32_i2c_message_start and stm32_i2c_handle_reload both get a stop boolean indicating if the transfer should end with a STOP or not. However no specific handling is needed in those functions hence remove the parameter. Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 8

[PATCH 3/3] i2c: stm32: only send a STOP upon transfer completion

2022-09-08 Thread Alain Volmat
slower (ex: enabling lots of debug messages), ending up send 2 STOP (one automatically by the controller and a 2nd one at the end of the stm32_i2c_message_xfer function). Signed-off-by: Alain Volmat --- drivers/i2c/stm32f7_i2c.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCHv2 2/2] i2c: stm32f7: do not set the STOP condition on error

2022-09-07 Thread Alain Volmat
Hi, I confirm that a fix is necessary regarding this setting of the stop condition. As a matter of fact, the controller is already sending the stop condition in case of NACK so there is no need to send the stop condition. However, this fix is not enough since the nack could be detected few lines