public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 6/6] i2c: rcar_i2c: Move FSDA check to rcar_i2c_recover
Date: Wed, 6 Mar 2019 13:41:39 +0100	[thread overview]
Message-ID: <cd4afdb7-8a3e-9456-65ae-7d2ee56336f5@gmail.com> (raw)
In-Reply-To: <20190306104613.8153-6-ismael.luceno@silicon-gears.com>

On 3/6/19 11:46 AM, Ismael Luceno Cortes wrote:
> Cosmetic change.  Any call to the recover function would need to do the
> same check afterwards, so it's sensible to make it part of the function.
> 
> Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>

Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>

> ---
>  drivers/i2c/rcar_i2c.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
> index 78ef8acacc..8fe0aadffa 100644
> --- a/drivers/i2c/rcar_i2c.c
> +++ b/drivers/i2c/rcar_i2c.c
> @@ -81,12 +81,13 @@ static int rcar_i2c_finish(struct udevice *dev)
>  	return ret;
>  }
>  
> -static void rcar_i2c_recover(struct udevice *dev)
> +static int rcar_i2c_recover(struct udevice *dev)
>  {
>  	struct rcar_i2c_priv *priv = dev_get_priv(dev);
>  	u32 mcr = RCAR_I2C_ICMCR_MDBS | RCAR_I2C_ICMCR_OBPC;
>  	u32 mcra = mcr | RCAR_I2C_ICMCR_FSDA;
>  	int i;
> +	u32 mstat;
Nit: would be nice to keep these variables sorted in reverse xmas tree.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-03-06 12:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 10:46 [U-Boot] [PATCH v3 1/6] i2c: rcar_i2c: Setup SCL/SDA delay at rcar_i2c_set_speed Ismael Luceno Cortes
2019-03-06 10:46 ` [U-Boot] [PATCH v3 2/6] i2c: rcar_i2c: Add comments about registers & values Ismael Luceno Cortes
2019-03-06 12:40   ` Marek Vasut
2019-03-07  4:54   ` Heiko Schocher
2019-03-06 10:46 ` [U-Boot] [PATCH v3 3/6] i2c: rcar_i2c: Fix sending of slave addresses Ismael Luceno Cortes
2019-03-06 12:40   ` Marek Vasut
2019-03-07  4:55   ` Heiko Schocher
2019-03-06 10:46 ` [U-Boot] [PATCH v3 4/6] i2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xfer Ismael Luceno Cortes
2019-03-06 12:40   ` Marek Vasut
2019-03-07  4:55   ` Heiko Schocher
2019-03-06 10:46 ` [U-Boot] [PATCH v3 5/6] i2c: rcar_i2c: Set the slave address from rcar_i2c_xfer Ismael Luceno Cortes
2019-03-06 12:41   ` Marek Vasut
2019-03-07  4:56   ` Heiko Schocher
2019-03-06 10:46 ` [U-Boot] [PATCH v3 6/6] i2c: rcar_i2c: Move FSDA check to rcar_i2c_recover Ismael Luceno Cortes
2019-03-06 12:41   ` Marek Vasut [this message]
2019-03-07  4:57   ` Heiko Schocher
2019-03-07 11:59   ` Heiko Schocher
2019-03-07 12:15     ` Ismael Luceno Cortes
2019-03-06 12:39 ` [U-Boot] [PATCH v3 1/6] i2c: rcar_i2c: Setup SCL/SDA delay at rcar_i2c_set_speed Marek Vasut
2019-03-07  4:53 ` Heiko Schocher
2019-03-07  5:14 ` Heiko Schocher
2019-03-07  8:04   ` Marek Vasut
2019-03-07  8:17     ` Heiko Schocher
2019-03-07  8:29       ` Marek Vasut

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=cd4afdb7-8a3e-9456-65ae-7d2ee56336f5@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.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