linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Haavard Skinnemoen <hskinnemoen@gmail.com>
Subject: Re: [PATCH] i2c: gpio: merge two very similar comments
Date: Wed, 23 Jan 2019 11:18:54 +0100	[thread overview]
Message-ID: <20190123101854.ps42vsgehusaimi5@verge.net.au> (raw)
In-Reply-To: <20190119113642.5348-1-wsa+renesas@sang-engineering.com>

On Sat, Jan 19, 2019 at 12:36:42PM +0100, Wolfram Sang wrote:
> I think it is clear enough if we have the explanation once and make it
> clear it is applicable for both SCL and SDA.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/i2c/busses/i2c-gpio.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> index c008d209f0b8..b9d43bc2853f 100644
> --- a/drivers/i2c/busses/i2c-gpio.c
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -286,10 +286,10 @@ static int i2c_gpio_probe(struct platform_device *pdev)
>  
>  	/*
>  	 * First get the GPIO pins; if it fails, we'll defer the probe.
> -	 * If the SDA line is marked from platform data or device tree as
> -	 * "open drain" it means something outside of our control is making
> -	 * this line being handled as open drain, and we should just handle
> -	 * it as any other output. Else we enforce open drain as this is
> +	 * If the SCL/SDA lines are marked from platform data or device tree
> +	 * as "open drain" it means something outside of our control is making
> +	 * these lines being handled as open drain, and we should just handle
> +	 * them as any other output. Else we enforce open drain as this is
>  	 * required for an I2C bus.

<2c>
	If the SCL/SDA lines are marked "open drain" by platform data or
	device tree then this means that something outside of our control is
	marking these lines to be handled as open drain, and we should just
	handle them as we handle any other output. Else we enforce open
	drain as this is required for an I2C bus.
</2c>

>  	 */
>  	if (pdata->sda_is_open_drain)
> @@ -300,13 +300,6 @@ static int i2c_gpio_probe(struct platform_device *pdev)
>  	if (IS_ERR(priv->sda))
>  		return PTR_ERR(priv->sda);
>  
> -	/*
> -	 * If the SCL line is marked from platform data or device tree as
> -	 * "open drain" it means something outside of our control is making
> -	 * this line being handled as open drain, and we should just handle
> -	 * it as any other output. Else we enforce open drain as this is
> -	 * required for an I2C bus.
> -	 */
>  	if (pdata->scl_is_open_drain)
>  		gflags = GPIOD_OUT_HIGH;
>  	else
> -- 
> 2.11.0
> 

  reply	other threads:[~2019-01-23 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19 11:36 [PATCH] i2c: gpio: merge two very similar comments Wolfram Sang
2019-01-23 10:18 ` Simon Horman [this message]
2019-01-23 18:42   ` Wolfram Sang
2019-01-24 11:39     ` Simon Horman

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=20190123101854.ps42vsgehusaimi5@verge.net.au \
    --to=horms@verge.net.au \
    --cc=hskinnemoen@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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;
as well as URLs for NNTP newsgroup(s).