Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "pinctrl: qcom: spmi-gpio: make the irqchip immutable"

This reverts commit 7542766e78fc374d81d8c2db214c4b4308645277.

It was noted during follow-up that the approach is incorrect.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+10 -12
+10 -12
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 171 171 struct regmap *map; 172 172 struct pinctrl_dev *ctrl; 173 173 struct gpio_chip chip; 174 + struct irq_chip irq; 174 175 u8 usid; 175 176 u8 pid_base; 176 177 }; ··· 988 987 return fwspec; 989 988 } 990 989 991 - static const struct irq_chip spmi_gpio_irq_chip = { 992 - .name = "spmi-gpio", 993 - .irq_ack = irq_chip_ack_parent, 994 - .irq_mask = irq_chip_mask_parent, 995 - .irq_unmask = irq_chip_unmask_parent, 996 - .irq_set_type = irq_chip_set_type_parent, 997 - .irq_set_wake = irq_chip_set_wake_parent, 998 - .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND, 999 - GPIOCHIP_IRQ_RESOURCE_HELPERS, 1000 - }; 1001 - 1002 990 static int pmic_gpio_probe(struct platform_device *pdev) 1003 991 { 1004 992 struct irq_domain *parent_domain; ··· 1081 1091 if (!parent_domain) 1082 1092 return -ENXIO; 1083 1093 1094 + state->irq.name = "spmi-gpio", 1095 + state->irq.irq_ack = irq_chip_ack_parent, 1096 + state->irq.irq_mask = irq_chip_mask_parent, 1097 + state->irq.irq_unmask = irq_chip_unmask_parent, 1098 + state->irq.irq_set_type = irq_chip_set_type_parent, 1099 + state->irq.irq_set_wake = irq_chip_set_wake_parent, 1100 + state->irq.flags = IRQCHIP_MASK_ON_SUSPEND, 1101 + 1084 1102 girq = &state->chip.irq; 1085 - gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip); 1103 + girq->chip = &state->irq; 1086 1104 girq->default_type = IRQ_TYPE_NONE; 1087 1105 girq->handler = handle_level_irq; 1088 1106 girq->fwnode = of_node_to_fwnode(state->dev->of_node);