[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180713210920.3648-4-wsa+renesas@sang-engineering.com>
Date: Fri, 13 Jul 2018 23:09:15 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-i2c@...r.kernel.org
Cc: linux-renesas-soc@...r.kernel.org, kernel@...gutronix.de,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH/RFT 3/6] i2c: designware: set SDA as output for recovery
This allows for sending STOP when generating pulses which is much more
robust because it will bring clients into a default state.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
drivers/i2c/busses/i2c-designware-master.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index a546db80f53e..25981efc844e 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -674,7 +674,7 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
}
rinfo->scl_gpiod = gpio;
- gpio = devm_gpiod_get_optional(dev->dev, "sda", GPIOD_IN);
+ gpio = devm_gpiod_get_optional(dev->dev, "sda", GPIOD_OUT_HIGH_OPEN_DRAIN);
if (IS_ERR(gpio))
return PTR_ERR(gpio);
rinfo->sda_gpiod = gpio;
--
2.11.0
Powered by blists - more mailing lists