summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-02-05 07:58:41 -0500
committerWolfram Sang <wsa@the-dreams.de>2019-02-08 16:27:18 -0500
commit60c1d5605b67218cc600588af59260c0d1144495 (patch)
tree9b54c950f490dd7e57525deb833ee4cf6610c115 /drivers/i2c
parent8fbd9b08b73e6de17b958a107e69a998faba18fa (diff)
i2c: gpio: merge two very similar comments
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-gpio.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 362d3b9dd3b6..2d532cc042f5 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)
286 286
287 /* 287 /*
288 * First get the GPIO pins; if it fails, we'll defer the probe. 288 * First get the GPIO pins; if it fails, we'll defer the probe.
289 * If the SDA line is marked from platform data or device tree as 289 * If the SCL/SDA lines are marked "open drain" by platform data or
290 * "open drain" it means something outside of our control is making 290 * device tree then this means that something outside of our control is
291 * this line being handled as open drain, and we should just handle 291 * marking these lines to be handled as open drain, and we should just
292 * it as any other output. Else we enforce open drain as this is 292 * handle them as we handle any other output. Else we enforce open
293 * required for an I2C bus. 293 * drain as this is required for an I2C bus.
294 */ 294 */
295 if (pdata->sda_is_open_drain) 295 if (pdata->sda_is_open_drain)
296 gflags = GPIOD_OUT_HIGH; 296 gflags = GPIOD_OUT_HIGH;
@@ -300,13 +300,6 @@ static int i2c_gpio_probe(struct platform_device *pdev)
300 if (IS_ERR(priv->sda)) 300 if (IS_ERR(priv->sda))
301 return PTR_ERR(priv->sda); 301 return PTR_ERR(priv->sda);
302 302
303 /*
304 * If the SCL line is marked from platform data or device tree as
305 * "open drain" it means something outside of our control is making
306 * this line being handled as open drain, and we should just handle
307 * it as any other output. Else we enforce open drain as this is
308 * required for an I2C bus.
309 */
310 if (pdata->scl_is_open_drain) 303 if (pdata->scl_is_open_drain)
311 gflags = GPIOD_OUT_HIGH; 304 gflags = GPIOD_OUT_HIGH;
312 else 305 else