diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-06-16 08:56:36 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-06-29 02:23:12 -0400 |
commit | 12b731dd46d9ee646318e6e9dc587314a3908a46 (patch) | |
tree | d3c4e9740a34ad3cd0a3a22b43eec360d5ca23c5 /drivers | |
parent | 9aa613674f89d01248ae2e4afe691b515ff8fbb6 (diff) |
i2c: gpio: initialize SCL to HIGH again
It seems that during the conversion from gpio* to gpiod*, the initial
state of SCL was wrongly switched to LOW. Fix it to be HIGH again.
Fixes: 7bb75029ef34 ("i2c: gpio: Enforce open drain through gpiolib")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 005e6e0330c2..66f85bbf3591 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c | |||
@@ -279,9 +279,9 @@ static int i2c_gpio_probe(struct platform_device *pdev) | |||
279 | * required for an I2C bus. | 279 | * required for an I2C bus. |
280 | */ | 280 | */ |
281 | if (pdata->scl_is_open_drain) | 281 | if (pdata->scl_is_open_drain) |
282 | gflags = GPIOD_OUT_LOW; | 282 | gflags = GPIOD_OUT_HIGH; |
283 | else | 283 | else |
284 | gflags = GPIOD_OUT_LOW_OPEN_DRAIN; | 284 | gflags = GPIOD_OUT_HIGH_OPEN_DRAIN; |
285 | priv->scl = i2c_gpio_get_desc(dev, "scl", 1, gflags); | 285 | priv->scl = i2c_gpio_get_desc(dev, "scl", 1, gflags); |
286 | if (IS_ERR(priv->scl)) | 286 | if (IS_ERR(priv->scl)) |
287 | return PTR_ERR(priv->scl); | 287 | return PTR_ERR(priv->scl); |