2020-06-02 19:43:08

by Lubomir Rintel

[permalink] [raw]
Subject: [PATCH] i2c: pxa: don't error out if there's no pinctrl

The bus recovery patch regresses on OLPC XO-1.75 that has no pinctrl in
its DT.

Fixes: 7c9ec2c52518 ("i2c: pxa: implement generic i2c bus recovery")'
Signed-off-by: Lubomir Rintel <[email protected]>
---
drivers/i2c/busses/i2c-pxa.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index a7885b8b5031c..35ca2c02c9b9b 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1348,6 +1348,8 @@ static int i2c_pxa_init_recovery(struct pxa_i2c *i2c)
return 0;

i2c->pinctrl = devm_pinctrl_get(dev);
+ if (PTR_ERR(i2c->pinctrl) == -ENODEV)
+ i2c->pinctrl = NULL;
if (IS_ERR(i2c->pinctrl))
return PTR_ERR(i2c->pinctrl);

--
2.26.2


2020-06-03 20:40:43

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: pxa: don't error out if there's no pinctrl

On Tue, Jun 02, 2020 at 09:38:23PM +0200, Lubomir Rintel wrote:
> The bus recovery patch regresses on OLPC XO-1.75 that has no pinctrl in
> its DT.
>
> Fixes: 7c9ec2c52518 ("i2c: pxa: implement generic i2c bus recovery")'
> Signed-off-by: Lubomir Rintel <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (312.00 B)
signature.asc (849.00 B)
Download all attachments