]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
i2c: imx: use open drain for recovery GPIO
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 13 Jul 2018 21:09:14 +0000 (23:09 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 24 Jul 2018 12:59:12 +0000 (14:59 +0200)
I2C is open drain, so request the GPIO accordingly, even if pinmux did
set it up correctly for in-kernel users in this case.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-imx.c

index 39cfd98c7b23421dcfc8715afc9c68c32845177a..498c5e89164988beb8d82e5f4bc53aac82b137ac 100644 (file)
@@ -1009,7 +1009,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
        i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
                        "gpio");
        rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
-       rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH);
+       rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
 
        if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER ||
            PTR_ERR(rinfo->scl_gpiod) == -EPROBE_DEFER) {