Commit d1fa7452 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Wolfram Sang
Browse files

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: ca382f5b

 ("i2c: designware: add i2c gpio recovery option")
Reported-by: default avatarDominik Brodowski <>
Signed-off-by: default avatarAndy Shevchenko <>
Tested-by: default avatarDominik Brodowski <>
Signed-off-by: default avatarWolfram Sang <>
parent c396b9a0
......@@ -644,7 +644,7 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
gpio = devm_gpiod_get(dev->dev, "scl", GPIOD_OUT_HIGH);
if (IS_ERR(gpio)) {
r = PTR_ERR(gpio);
if (r == -ENOENT)
if (r == -ENOENT || r == -ENOSYS)
return 0;
return r;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment