Commit 5e503115 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Linus Walleij

pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage

Fix the following warnings caused by reusage of the same irq_chip
instance for all spmi-gpio gpio_irq_chip instances. Instead embed
irq_chip into pmic_gpio_state struct.

gpio gpiochip2: (c440000.qcom,spmi:pmic@2:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver.
gpio gpiochip3: (c440000.qcom,spmi:pmic@4:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver.
gpio gpiochip4: (c440000.qcom,spmi:pmic@a:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver.
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200604002817.667160-1-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b3a9e3b9
...@@ -170,6 +170,7 @@ struct pmic_gpio_state { ...@@ -170,6 +170,7 @@ struct pmic_gpio_state {
struct regmap *map; struct regmap *map;
struct pinctrl_dev *ctrl; struct pinctrl_dev *ctrl;
struct gpio_chip chip; struct gpio_chip chip;
struct irq_chip irq;
}; };
static const struct pinconf_generic_params pmic_gpio_bindings[] = { static const struct pinconf_generic_params pmic_gpio_bindings[] = {
...@@ -917,16 +918,6 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state, ...@@ -917,16 +918,6 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
return 0; return 0;
} }
static struct irq_chip pmic_gpio_irq_chip = {
.name = "spmi-gpio",
.irq_ack = irq_chip_ack_parent,
.irq_mask = irq_chip_mask_parent,
.irq_unmask = irq_chip_unmask_parent,
.irq_set_type = irq_chip_set_type_parent,
.irq_set_wake = irq_chip_set_wake_parent,
.flags = IRQCHIP_MASK_ON_SUSPEND,
};
static int pmic_gpio_domain_translate(struct irq_domain *domain, static int pmic_gpio_domain_translate(struct irq_domain *domain,
struct irq_fwspec *fwspec, struct irq_fwspec *fwspec,
unsigned long *hwirq, unsigned long *hwirq,
...@@ -1053,8 +1044,16 @@ static int pmic_gpio_probe(struct platform_device *pdev) ...@@ -1053,8 +1044,16 @@ static int pmic_gpio_probe(struct platform_device *pdev)
if (!parent_domain) if (!parent_domain)
return -ENXIO; return -ENXIO;
state->irq.name = "spmi-gpio",
state->irq.irq_ack = irq_chip_ack_parent,
state->irq.irq_mask = irq_chip_mask_parent,
state->irq.irq_unmask = irq_chip_unmask_parent,
state->irq.irq_set_type = irq_chip_set_type_parent,
state->irq.irq_set_wake = irq_chip_set_wake_parent,
state->irq.flags = IRQCHIP_MASK_ON_SUSPEND,
girq = &state->chip.irq; girq = &state->chip.irq;
girq->chip = &pmic_gpio_irq_chip; girq->chip = &state->irq;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq; girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(state->dev->of_node); girq->fwnode = of_node_to_fwnode(state->dev->of_node);
......
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