Skip to content

Commit

Permalink
i2c: pxa: don't error out if there's no pinctrl
Browse files Browse the repository at this point in the history
The bus recovery patch regresses on OLPC XO-1.75 that has no pinctrl in
its DT.

Fixes: 7c9ec2c ("i2c: pxa: implement generic i2c bus recovery")'
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Lubomir Rintel authored and Wolfram Sang committed Jun 3, 2020
1 parent fad5972 commit 9fa060d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9fa060d

Please sign in to comment.