Linux-Renesas-SoC Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2] i2c: gpio: merge two very similar comments
@ 2019-02-05 12:58 Wolfram Sang
  2019-02-05 13:13 ` Geert Uytterhoeven
  2019-02-08 21:30 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2019-02-05 12:58 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-renesas-soc, Haavard Skinnemoen, Wolfram Sang, Simon Horman

I think it is clear enough if we have the explanation once and make it
clear it is applicable for both SCL and SDA. Reword it a little with
the help of Simon's native language skills :)

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Change since v1: add Simon's rewording

 drivers/i2c/busses/i2c-gpio.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index c008d209f0b8..e8cde2c40d3f 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -286,11 +286,11 @@ 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
-	 * required for an I2C bus.
+	 * 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.
 	 */
 	if (pdata->sda_is_open_drain)
 		gflags = GPIOD_OUT_HIGH;
@@ -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.19.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] i2c: gpio: merge two very similar comments
  2019-02-05 12:58 [PATCH v2] i2c: gpio: merge two very similar comments Wolfram Sang
@ 2019-02-05 13:13 ` Geert Uytterhoeven
  2019-02-08 21:30 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-02-05 13:13 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux I2C, Linux-Renesas, Haavard Skinnemoen, Simon Horman

On Tue, Feb 5, 2019 at 2:11 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> 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. Reword it a little with
> the help of Simon's native language skills :)
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] i2c: gpio: merge two very similar comments
  2019-02-05 12:58 [PATCH v2] i2c: gpio: merge two very similar comments Wolfram Sang
  2019-02-05 13:13 ` Geert Uytterhoeven
@ 2019-02-08 21:30 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2019-02-08 21:30 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-renesas-soc, Haavard Skinnemoen, Simon Horman

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

On Tue, Feb 05, 2019 at 01:58:41PM +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. Reword it a little with
> the help of Simon's native language skills :)
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 12:58 [PATCH v2] i2c: gpio: merge two very similar comments Wolfram Sang
2019-02-05 13:13 ` Geert Uytterhoeven
2019-02-08 21:30 ` Wolfram Sang

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox