Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12b731dd authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang
Browse files

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: 7bb75029 ("i2c: gpio: Enforce open drain through gpiolib")
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
parent 9aa61367
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -279,9 +279,9 @@ static int i2c_gpio_probe(struct platform_device *pdev)
	 * required for an I2C bus.
	 * required for an I2C bus.
	 */
	 */
	if (pdata->scl_is_open_drain)
	if (pdata->scl_is_open_drain)
		gflags = GPIOD_OUT_LOW;
		gflags = GPIOD_OUT_HIGH;
	else
	else
		gflags = GPIOD_OUT_LOW_OPEN_DRAIN;
		gflags = GPIOD_OUT_HIGH_OPEN_DRAIN;
	priv->scl = i2c_gpio_get_desc(dev, "scl", 1, gflags);
	priv->scl = i2c_gpio_get_desc(dev, "scl", 1, gflags);
	if (IS_ERR(priv->scl))
	if (IS_ERR(priv->scl))
		return PTR_ERR(priv->scl);
		return PTR_ERR(priv->scl);