* [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree
@ 2024-05-22 18:08 Konrad Dybcio
2024-05-22 19:36 ` Abel Vesa
2024-07-18 21:02 ` Stephen Boyd
0 siblings, 2 replies; 4+ messages in thread
From: Konrad Dybcio @ 2024-05-22 18:08 UTC (permalink / raw)
To: Stephen Boyd
Cc: Bjorn Andersson, Dmitry Baryshkov, Abel Vesa, linux-kernel,
Konrad Dybcio
Currently, irqchips for all of the subnodes (which represent a given
bus master) point to the parent wrapper node. This is no bueno, as
no interrupts arrive, ever (because nothing references that node).
Fix that by passing a reference to the respective master's of_node.
Worth noting, this is a NOP for devices with only a single master
described.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Un-delete the missing ampersand
- Link to v1: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v1-1-f7098b9c8804@linaro.org
---
drivers/spmi/spmi-pmic-arb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 791cdc160c51..e6a4bf3abb1f 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
- bus->domain = irq_domain_add_tree(dev->of_node,
- &pmic_arb_irq_domain_ops, bus);
+ bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
if (!bus->domain) {
dev_err(&pdev->dev, "unable to create irq_domain\n");
return -ENOMEM;
---
base-commit: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b
change-id: 20240522-topic-spmi_multi_master_irqfix-f63ebf47b02c
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree
2024-05-22 18:08 [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Konrad Dybcio
@ 2024-05-22 19:36 ` Abel Vesa
2024-07-10 14:24 ` Dmitry Baryshkov
2024-07-18 21:02 ` Stephen Boyd
1 sibling, 1 reply; 4+ messages in thread
From: Abel Vesa @ 2024-05-22 19:36 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Stephen Boyd, Bjorn Andersson, Dmitry Baryshkov, linux-kernel
On 24-05-22 20:08:17, Konrad Dybcio wrote:
> Currently, irqchips for all of the subnodes (which represent a given
> bus master) point to the parent wrapper node. This is no bueno, as
> no interrupts arrive, ever (because nothing references that node).
>
> Fix that by passing a reference to the respective master's of_node.
>
> Worth noting, this is a NOP for devices with only a single master
> described.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
You forgot the fixes tag here as well.
LGTM otherwise.
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> Changes in v2:
> - Un-delete the missing ampersand
> - Link to v1: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v1-1-f7098b9c8804@linaro.org
> ---
> drivers/spmi/spmi-pmic-arb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
> index 791cdc160c51..e6a4bf3abb1f 100644
> --- a/drivers/spmi/spmi-pmic-arb.c
> +++ b/drivers/spmi/spmi-pmic-arb.c
> @@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
>
> dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
>
> - bus->domain = irq_domain_add_tree(dev->of_node,
> - &pmic_arb_irq_domain_ops, bus);
> + bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
> if (!bus->domain) {
> dev_err(&pdev->dev, "unable to create irq_domain\n");
> return -ENOMEM;
>
> ---
> base-commit: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b
> change-id: 20240522-topic-spmi_multi_master_irqfix-f63ebf47b02c
>
> Best regards,
> --
> Konrad Dybcio <konrad.dybcio@linaro.org>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree
2024-05-22 19:36 ` Abel Vesa
@ 2024-07-10 14:24 ` Dmitry Baryshkov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2024-07-10 14:24 UTC (permalink / raw)
To: Abel Vesa, Greg Kroah-Hartman
Cc: Konrad Dybcio, Stephen Boyd, Bjorn Andersson, linux-kernel
On Wed, May 22, 2024 at 10:36:59PM +0300, Abel Vesa wrote:
> On 24-05-22 20:08:17, Konrad Dybcio wrote:
> > Currently, irqchips for all of the subnodes (which represent a given
> > bus master) point to the parent wrapper node. This is no bueno, as
> > no interrupts arrive, ever (because nothing references that node).
> >
> > Fix that by passing a reference to the respective master's of_node.
> >
> > Worth noting, this is a NOP for devices with only a single master
> > described.
> >
> > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> You forgot the fixes tag here as well.
Fixes: 02922ccbb330 ("spmi: pmic-arb: Register controller for bus instead of arbiter")
Cc: stable@vger.kernel.org # 6.10
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Let's hope we can get it in 6.11 at least (6.10 would still be better)
>
> LGTM otherwise.
>
> Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
>
> > ---
> > Changes in v2:
> > - Un-delete the missing ampersand
> > - Link to v1: https://lore.kernel.org/r/20240522-topic-spmi_multi_master_irqfix-v1-1-f7098b9c8804@linaro.org
> > ---
> > drivers/spmi/spmi-pmic-arb.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
> > index 791cdc160c51..e6a4bf3abb1f 100644
> > --- a/drivers/spmi/spmi-pmic-arb.c
> > +++ b/drivers/spmi/spmi-pmic-arb.c
> > @@ -1737,8 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
> >
> > dev_dbg(&pdev->dev, "adding irq domain for bus %d\n", bus_index);
> >
> > - bus->domain = irq_domain_add_tree(dev->of_node,
> > - &pmic_arb_irq_domain_ops, bus);
> > + bus->domain = irq_domain_add_tree(node, &pmic_arb_irq_domain_ops, bus);
> > if (!bus->domain) {
> > dev_err(&pdev->dev, "unable to create irq_domain\n");
> > return -ENOMEM;
> >
> > ---
> > base-commit: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b
> > change-id: 20240522-topic-spmi_multi_master_irqfix-f63ebf47b02c
> >
> > Best regards,
> > --
> > Konrad Dybcio <konrad.dybcio@linaro.org>
> >
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree
2024-05-22 18:08 [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Konrad Dybcio
2024-05-22 19:36 ` Abel Vesa
@ 2024-07-18 21:02 ` Stephen Boyd
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-07-18 21:02 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Dmitry Baryshkov, Abel Vesa, linux-kernel,
Konrad Dybcio
Quoting Konrad Dybcio (2024-05-22 11:08:17)
> Currently, irqchips for all of the subnodes (which represent a given
> bus master) point to the parent wrapper node. This is no bueno, as
> no interrupts arrive, ever (because nothing references that node).
>
> Fix that by passing a reference to the respective master's of_node.
>
> Worth noting, this is a NOP for devices with only a single master
> described.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
Applied to spmi-next
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-18 21:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 18:08 [PATCH v2] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Konrad Dybcio
2024-05-22 19:36 ` Abel Vesa
2024-07-10 14:24 ` Dmitry Baryshkov
2024-07-18 21:02 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox