]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i2c: gpio: merge two very similar comments
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 5 Feb 2019 12:58:41 +0000 (13:58 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 8 Feb 2019 21:27:18 +0000 (22:27 +0100)
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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-gpio.c

index 362d3b9dd3b6480087555bb675fe8d3519206a1b..2d532cc042f54ff627c0f587bf3e25182b13272b 100644 (file)
@@ -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