Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: imx: use proper GPIO directions for recovery

When converting to GPIOD, the GPIO directions of SCL/SDA have been
swapped. Fix it!

Fixes: ad36a27959cabb ("i2c: imx: switch to using gpiod for bus recovery gpios")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Wolfram Sang and committed by
Wolfram Sang
4c3c9a9d adbd77b5

+2 -2
+2 -2
drivers/i2c/busses/i2c-imx.c
··· 1006 1006 PINCTRL_STATE_DEFAULT); 1007 1007 i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl, 1008 1008 "gpio"); 1009 - rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_OUT_HIGH); 1010 - rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_IN); 1009 + rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN); 1010 + rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH); 1011 1011 1012 1012 if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER || 1013 1013 PTR_ERR(rinfo->scl_gpiod) == -EPROBE_DEFER) {