Re: [PATCH] i2c: imx: use proper GPIO directions for recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/12/2017 20:31, Wolfram Sang wrote:
When converting to GPIOD, the GPIO directions of SCL/SDA have been
swapped. Fix it!
Sorry about that.

Reviewed-by: Phil Reid <preid@xxxxxxxxxxxxxxxxx>



Fixes: ad36a27959cabb ("i2c: imx: switch to using gpiod for bus recovery gpios")
Cc: Clemens Gruber <clemens.gruber@xxxxxxxxxxxx>
Cc: Phil Reid <preid@xxxxxxxxxxxxxxxxx>
Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
  drivers/i2c/busses/i2c-imx.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index c4cf26571b6612..6c0d59ddf5b6fd 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1006,8 +1006,8 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
  			PINCTRL_STATE_DEFAULT);
  	i2c_imx->pinctrl_pins_gpio = pinctrl_lookup_state(i2c_imx->pinctrl,
  			"gpio");
-	rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_OUT_HIGH);
-	rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_IN);
+	rinfo->sda_gpiod = devm_gpiod_get(&pdev->dev, "sda", GPIOD_IN);
+	rinfo->scl_gpiod = devm_gpiod_get(&pdev->dev, "scl", GPIOD_OUT_HIGH);
if (PTR_ERR(rinfo->sda_gpiod) == -EPROBE_DEFER ||
  	    PTR_ERR(rinfo->scl_gpiod) == -EPROBE_DEFER) {



--
Regards
Phil Reid



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux