Re: [PATCH 2/2] i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23-01-25, Sascha Hauer wrote:
> Based on the corresponding Kernel commit c126f7c3b8c4:
> 
> The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up
> by the bus driver, which the case for Tegra I2C driver for example. This
> error code is then propagated to I2C client and might be confusing, thus
> make i2c_recover_bus() to return -EBUSY instead.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Reviewed-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>

> ---
>  drivers/i2c/i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
> index 7e1cea49f3..f3efb62087 100644
> --- a/drivers/i2c/i2c.c
> +++ b/drivers/i2c/i2c.c
> @@ -353,7 +353,7 @@ int i2c_generic_gpio_recovery(struct i2c_adapter *adap)
>  int i2c_recover_bus(struct i2c_adapter *adap)
>  {
>  	if (!adap->bus_recovery_info)
> -		return -EOPNOTSUPP;
> +		return -EBUSY;
>  
>  	dev_dbg(&adap->dev, "Trying i2c bus recovery\n");
>  	return adap->bus_recovery_info->recover_bus(adap);
> -- 
> 2.30.2
> 
> 
> 




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux