mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented
Date: Wed, 25 Jan 2023 10:21:45 +0100	[thread overview]
Message-ID: <20230125092145.3jbkrhulfgkgg3qb@pengutronix.de> (raw)
In-Reply-To: <20230125073739.1992152-2-s.hauer@pengutronix.de>

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@pengutronix.de>

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

> ---
>  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
> 
> 
> 



  reply	other threads:[~2023-01-25  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25  7:37 [PATCH 1/2] i2c: i.MX: Use better error code when bus recovery failed Sascha Hauer
2023-01-25  7:37 ` [PATCH 2/2] i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented Sascha Hauer
2023-01-25  9:21   ` Marco Felsch [this message]
2023-01-25  9:21 ` [PATCH 1/2] i2c: i.MX: Use better error code when bus recovery failed Marco Felsch
2023-01-25  9:41   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230125092145.3jbkrhulfgkgg3qb@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox