Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cc6a7c4 authored by David Collins's avatar David Collins
Browse files

pinctrl: qcom: spmi-gpio: define an irqchip for each pinctrl device



Generate a new irqchip struct for each pinctrl device that is
registered to avoid sharing the same irqchip between devices.
This corrects the following error which is printed when
registering more than one pinctrl-spmi-gpio device:

  "detected irqchip that is shared with multiple gpiochips:
   please fix the driver."

Change-Id: I80ce67fc674b96f4386499f547395ceed7480583
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent b1ebdc37
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1083,7 +1083,12 @@ static int pmic_gpio_probe(struct platform_device *pdev)
		return -ENXIO;

	girq = &state->chip.irq;
	girq->chip = &pmic_gpio_irq_chip;

	girq->chip = devm_kmemdup(dev, &pmic_gpio_irq_chip,
				  sizeof(pmic_gpio_irq_chip), GFP_KERNEL);
	if (!girq->chip)
		return -ENOMEM;

	girq->default_type = IRQ_TYPE_NONE;
	girq->handler = handle_level_irq;
	girq->fwnode = of_node_to_fwnode(state->dev->of_node);