aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-11-25 09:16:11 -0500
committerLinus Walleij <linus.walleij@linaro.org>2016-12-07 10:02:55 -0500
commitf821444508743a3e56320d0cb2b8c4603637660c (patch)
tree540cea4d56c2b158da1fa8ae768134c30a9f403a
parente1a0d869d592984f8a64f1cdc6710fa74041fc47 (diff)
pinctrl: sx150x: use new nested IRQ infrastructure
Use the new gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip() calls to properly created a nested irqchip and mark all child irqs properly with their parent IRQ. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-sx150x.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index bdb7ea3d9911..29fb7403d24e 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -1221,9 +1221,9 @@ static int sx150x_probe(struct i2c_client *client,
1221 * plus it will be instantly noticeable if it is ever 1221 * plus it will be instantly noticeable if it is ever
1222 * called (should not happen) 1222 * called (should not happen)
1223 */ 1223 */
1224 ret = gpiochip_irqchip_add(&pctl->gpio, 1224 ret = gpiochip_irqchip_add_nested(&pctl->gpio,
1225 &pctl->irq_chip, 0, 1225 &pctl->irq_chip, 0,
1226 handle_bad_irq, IRQ_TYPE_NONE); 1226 handle_bad_irq, IRQ_TYPE_NONE);
1227 if (ret) { 1227 if (ret) {
1228 dev_err(dev, "could not connect irqchip to gpiochip\n"); 1228 dev_err(dev, "could not connect irqchip to gpiochip\n");
1229 return ret; 1229 return ret;
@@ -1236,6 +1236,10 @@ static int sx150x_probe(struct i2c_client *client,
1236 pctl->irq_chip.name, pctl); 1236 pctl->irq_chip.name, pctl);
1237 if (ret < 0) 1237 if (ret < 0)
1238 return ret; 1238 return ret;
1239
1240 gpiochip_set_nested_irqchip(&pctl->gpio,
1241 &pctl->irq_chip,
1242 client->irq);
1239 } 1243 }
1240 1244
1241 /* Pinctrl_desc */ 1245 /* Pinctrl_desc */