linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org,
	alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
Date: Thu, 10 Mar 2022 10:42:42 +0000	[thread overview]
Message-ID: <5e13c1ba-0bf5-e360-c350-e7a1a1402350@linaro.org> (raw)
In-Reply-To: <CA+V-a8tkhERx+8zDae5aWkNQ9Oxd1AamRL=i4TDC2X8RGgAo0w@mail.gmail.com>



On 10/03/2022 10:23, Lad, Prabhakar wrote:
> On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org> wrote:
>>
>>
>>
>> On 24/12/2021 16:13, Lad Prabhakar wrote:
>>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
>>> allocation of IRQ resources in DT core code, this causes an issue
>>
>> Are you saying that we should not be using platform_get_resource(pdev,
>> IORESOURCE_IRQ, ...) on drivers that support DT?
>>
>>> when using hierarchical interrupt domains using "interrupts" property
>>> in the node as this bypasses the hierarchical setup and messes up the
>>> irq chaining.
>>
>> Should this not be fixed in the DT core itself?
>>
> Yes the plan is to fix in the DT core itself (refer [0]).
> 
> [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> 
>>>
>>> In preparation for removal of static setup of IRQ resource from DT core
>>> code use platform_get_irq().
>>
>> I would prefer this patch to be part of the series that removes IRQ
>> resource handling from DT core.
>>
> Since there are too many users (which are in different subsystems)
> getting this all in single series would be a pain. As a result it is
> split up into individual subsystems.
Am happy for this to be included in that series,
TBH, this patch make more sense along with that series than by itself.

This would also give better insight of what exactly is changing in 
platform_get_resource() w.r.t handling IRQ resources.


--srini

> 
> Cheers,
> Prabhakar
> 
>>
>> --srini
>>
>>>
>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>> ---
>>> Hi,
>>>
>>> Dropping usage of platform_get_resource() was agreed based on
>>> the discussion [0].
>>>
>>> [0] https://patchwork.kernel.org/project/linux-renesas-soc/
>>> patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
>>>
>>> Cheers,
>>> Prabhakar
>>> ---
>>>    drivers/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>>>    1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
>>> index 7040293c2ee8..0f29a08b4c09 100644
>>> --- a/drivers/slimbus/qcom-ngd-ctrl.c
>>> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
>>> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>>>        if (IS_ERR(ctrl->base))
>>>                return PTR_ERR(ctrl->base);
>>>
>>> -     res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>>> -     if (!res) {
>>> -             dev_err(&pdev->dev, "no slimbus IRQ resource\n");
>>> -             return -ENODEV;
>>> -     }
>>> +     ret = platform_get_irq(pdev, 0);
>>> +     if (ret < 0)
>>> +             return ret;
>>>
>>> -     ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
>>> +     ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>>>                               IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>>>        if (ret) {
>>>                dev_err(&pdev->dev, "request IRQ failed\n");

  reply	other threads:[~2022-03-10 10:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24 16:13 [PATCH] perf/arm-ccn: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-24 16:13 ` [PATCH] platform: goldfish: pipe: " Lad Prabhakar
2022-03-09 12:09   ` Lad, Prabhakar
2022-03-09 12:23     ` Greg Kroah-Hartman
2021-12-24 16:13 ` [PATCH] slimbus: qcom-ngd-ctrl: " Lad Prabhakar
2021-12-24 18:08   ` Bjorn Andersson
2021-12-25 17:40   ` Steev Klimaszewski
2022-03-10  1:48   ` Lad, Prabhakar
2022-03-10 10:16   ` Srinivas Kandagatla
2022-03-10 10:23     ` Lad, Prabhakar
2022-03-10 10:42       ` Srinivas Kandagatla [this message]
2022-03-10 14:14         ` Rob Herring
2022-03-10 14:59           ` Srinivas Kandagatla
2022-03-11 19:38             ` Lad, Prabhakar
2021-12-24 16:13 ` [PATCH] staging: axis-fifo: " Lad Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e13c1ba-0bf5-e360-c350-e7a1a1402350@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).