36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
|
From ccf5cfbf95e7e65dd7ab7d6f7be01dc4b36342da 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 239/464] 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 fd8403b07fa6..1efc2b1970c2 100644
|
||
|
--- a/drivers/i2c/busses/i2c-mv64xxx.c
|
||
|
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
|
||
|
@@ -951,6 +951,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.34.1
|
||
|
|