diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-17 15:58:43 -0500 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-02-22 06:15:35 -0500 |
commit | d1fa74520dcdbeae891b30035e6c51aafa35306d (patch) | |
tree | 1f448d5bde7c90742cdd63e2cbfc5a3cffe95854 | |
parent | c396b9a03e3bb5e95e036bdb0c7d614e0e1a4e3d (diff) |
i2c: designware: Consider SCL GPIO optional
GPIO library can return -ENOSYS for the failed request.
Instead of failing ->probe() in this case override error code to 0.
Fixes: ca382f5b38f3 ("i2c: designware: add i2c gpio recovery option")
Reported-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 55926ef41ef1..05732531829f 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c | |||
@@ -644,7 +644,7 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev) | |||
644 | gpio = devm_gpiod_get(dev->dev, "scl", GPIOD_OUT_HIGH); | 644 | gpio = devm_gpiod_get(dev->dev, "scl", GPIOD_OUT_HIGH); |
645 | if (IS_ERR(gpio)) { | 645 | if (IS_ERR(gpio)) { |
646 | r = PTR_ERR(gpio); | 646 | r = PTR_ERR(gpio); |
647 | if (r == -ENOENT) | 647 | if (r == -ENOENT || r == -ENOSYS) |
648 | return 0; | 648 | return 0; |
649 | return r; | 649 | return r; |
650 | } | 650 | } |