Re: [PATCHv6 1/2] i2c: designware: introduce a custom scl recovery for SoCFPGA platforms

From: Jarkko Nikula
Date: Tue Jun 21 2022 - 10:15:06 EST


On 6/21/22 02:01, Dinh Nguyen wrote:
The I2C pins on the SoCFPGA platforms do not go through a GPIO module,
thus cannot be recovered by the default method of by doing a GPIO access.
Only a reset of the I2C IP block can a recovery be successful, so this
change effectively resets the I2C controller, NOT any attached clients.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>
---
v6: Updated commit log to emphasize this change only resets the I2C
controller and not any attached clients.
v5: removed strayed nextline
v4: re-arrange code per Andy Shevchenko's recommendation
v3: simplify the function
update commit message
v2: remove change to MODEL_MASK
s/i2c_custom_scl_recovery/i2c_socfpga_scl_recovery
---
drivers/i2c/busses/i2c-designware-core.h | 1 +
drivers/i2c/busses/i2c-designware-master.c | 49 ++++++++++++++++++---
drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
3 files changed, 45 insertions(+), 6 deletions(-)

Acked-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>