Skip to content

Commit b930151

Browse files
peda-rlinusw
authored andcommitted
pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping
Without such a range, gpiolib fails with -EPROBE_DEFER, pending the addition of the range. So, without a range, gpiolib will keep deferring indefinitely. Cc: stable@vger.kernel.org Fixes: 9e80f90 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver") Fixes: e10f72b ("gpio: gpiolib: Generalise state persistence beyond sleep") Suggested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 1a1d39e commit b930151

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/pinctrl/pinctrl-sx150x.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,11 @@ static int sx150x_probe(struct i2c_client *client,
11931193
if (ret)
11941194
return ret;
11951195

1196+
ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev),
1197+
0, 0, pctl->data->npins);
1198+
if (ret)
1199+
return ret;
1200+
11961201
/* Add Interrupt support if an irq is specified */
11971202
if (client->irq > 0) {
11981203
pctl->irq_chip.name = devm_kstrdup(dev, client->name,

0 commit comments

Comments
 (0)