1 From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2 To: linus.walleij@linaro.org
3 Cc: bjorn.andersson@linaro.org, dianders@chromium.org,
4 linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
5 linux-kernel@vger.kernel.org,
6 Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
7 Subject: [PATCH] pinctrl: qcom: Return -EINVAL for setting affinity if no IRQ
9 Date: Thu, 13 Jan 2022 21:56:17 +0530
10 Message-Id: <20220113162617.131697-1-manivannan.sadhasivam@linaro.org>
12 The MSM GPIO IRQ controller relies on the parent IRQ controller to set the
13 CPU affinity for the IRQ. And this is only valid if there is any wakeup
14 parent available and defined in DT.
16 For the case of no parent IRQ controller defined in DT,
17 msm_gpio_irq_set_affinity() and msm_gpio_irq_set_vcpu_affinity() should
18 return -EINVAL instead of 0 as the affinity can't be set.
20 Otherwise, below warning will be printed by genirq:
22 genirq: irq_chip msmgpio did not update eff. affinity mask of irq 70
24 Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
26 drivers/pinctrl/qcom/pinctrl-msm.c | 4 ++--
27 1 file changed, 2 insertions(+), 2 deletions(-)
29 --- a/drivers/pinctrl/qcom/pinctrl-msm.c
30 +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
31 @@ -1157,7 +1157,7 @@ static int msm_gpio_irq_set_affinity(str
32 if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
33 return irq_chip_set_affinity_parent(d, dest, force);
39 static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
40 @@ -1168,7 +1168,7 @@ static int msm_gpio_irq_set_vcpu_affinit
41 if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
42 return irq_chip_set_vcpu_affinity_parent(d, vcpu_info);
48 static void msm_gpio_irq_handler(struct irq_desc *desc)