mirror of https://gitee.com/openkylin/linux.git
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: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200604002817.667160-1-dmitry.baryshkov@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b3a9e3b962
commit
5e50311556
|
@ -170,6 +170,7 @@ struct pmic_gpio_state {
|
|||
struct regmap *map;
|
||||
struct pinctrl_dev *ctrl;
|
||||
struct gpio_chip chip;
|
||||
struct irq_chip irq;
|
||||
};
|
||||
|
||||
static const struct pinconf_generic_params pmic_gpio_bindings[] = {
|
||||
|
@ -917,16 +918,6 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
|
|||
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,
|
||||
struct irq_fwspec *fwspec,
|
||||
unsigned long *hwirq,
|
||||
|
@ -1053,8 +1044,16 @@ static int pmic_gpio_probe(struct platform_device *pdev)
|
|||
if (!parent_domain)
|
||||
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->chip = &pmic_gpio_irq_chip;
|
||||
girq->chip = &state->irq;
|
||||
girq->default_type = IRQ_TYPE_NONE;
|
||||
girq->handler = handle_level_irq;
|
||||
girq->fwnode = of_node_to_fwnode(state->dev->of_node);
|
||||
|
|
Loading…
Reference in New Issue