36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 5d7e3c6731ed68e95618ef1f59b886e06fb6d2df Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
|
Date: Sun, 17 Jan 2021 23:19:52 +0100
|
|
Subject: [PATCH 234/391] i2c: mv64xxx: Don't make a fuss when pinctrl recovery
|
|
state is not present
|
|
|
|
Otherwise dmesg log presents a useless error.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
drivers/i2c/busses/i2c-mv64xxx.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
|
|
index 047dfef7a..6fbbf44b5 100644
|
|
--- a/drivers/i2c/busses/i2c-mv64xxx.c
|
|
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
|
|
@@ -940,6 +940,14 @@ static int mv64xxx_i2c_init_recovery_info(struct mv64xxx_i2c_data *drv_data,
|
|
return -ENODEV;
|
|
}
|
|
|
|
+ if (IS_ERR(pinctrl_lookup_state(rinfo->pinctrl, "gpio")) &&
|
|
+ IS_ERR(pinctrl_lookup_state(rinfo->pinctrl, "recovery"))) {
|
|
+ /* No recovery state is vailable in pinctrl. */
|
|
+ devm_pinctrl_put(rinfo->pinctrl);
|
|
+ rinfo->pinctrl = NULL;
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
drv_data->adapter.bus_recovery_info = rinfo;
|
|
return 0;
|
|
}
|
|
--
|
|
2.35.3
|
|
|