Commit b930151e authored by Peter Rosin's avatar Peter Rosin Committed by Linus Walleij

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: 9e80f906 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")
Fixes: e10f72bf ("gpio: gpiolib: Generalise state persistence beyond sleep")
Suggested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1a1d39e1
......@@ -1193,6 +1193,11 @@ static int sx150x_probe(struct i2c_client *client,
if (ret)
return ret;
ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev),
0, 0, pctl->data->npins);
if (ret)
return ret;
/* Add Interrupt support if an irq is specified */
if (client->irq > 0) {
pctl->irq_chip.name = devm_kstrdup(dev, client->name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment