mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rui Miguel Silva" <rui.silva@linaro.org>
To: "Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, "Peter Chen" <peter.chen@kernel.org>,
	"Pawel Laszczak" <pawell@cadence.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Aswath Govindraju" <a-govindraju@ti.com>,
	"Felipe Balbi" <balbi@kernel.org>, "Bin Liu" <b-liu@ti.com>
Cc: <linux-renesas-soc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"Prabhakar" <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 4/6] usb: isp1760: Use platform_get_irq() to get the interrupt
Date: Mon, 20 Dec 2021 15:37:28 +0000	[thread overview]
Message-ID: <CGK8O8M50JX6.3E0WU3HUN6K5W@arch-thunder> (raw)
In-Reply-To: <20211220010411.12075-5-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Lad,
Thanks for the patch.

On Mon Dec 20, 2021 at 1:04 AM WET, Lad Prabhakar wrote:

> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq(). Also use irq_get_trigger_type to get the
> IRQ trigger flags.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

LGTM.
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>

------
Cheers,
     Rui

> ---
>  drivers/usb/isp1760/isp1760-if.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/isp1760/isp1760-if.c b/drivers/usb/isp1760/isp1760-if.c
> index 7cc349c0b2ad..65ba5aca2a4f 100644
> --- a/drivers/usb/isp1760/isp1760-if.c
> +++ b/drivers/usb/isp1760/isp1760-if.c
> @@ -13,6 +13,7 @@
>  
>  #include <linux/usb.h>
>  #include <linux/io.h>
> +#include <linux/irq.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/platform_device.h>
> @@ -191,17 +192,15 @@ static int isp1760_plat_probe(struct platform_device *pdev)
>  	unsigned long irqflags;
>  	unsigned int devflags = 0;
>  	struct resource *mem_res;
> -	struct resource *irq_res;
> +	int irq;
>  	int ret;
>  
>  	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  
> -	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!irq_res) {
> -		pr_warn("isp1760: IRQ resource not available\n");
> -		return -ENODEV;
> -	}
> -	irqflags = irq_res->flags & IRQF_TRIGGER_MASK;
> +	irq = platform_get_irq(pdev, 0);
> +	if (irq < 0)
> +		return irq;
> +	irqflags = irq_get_trigger_type(irq);
>  
>  	if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
>  		struct device_node *dp = pdev->dev.of_node;
> @@ -239,8 +238,7 @@ static int isp1760_plat_probe(struct platform_device *pdev)
>  		return -ENXIO;
>  	}
>  
> -	ret = isp1760_register(mem_res, irq_res->start, irqflags, &pdev->dev,
> -			       devflags);
> +	ret = isp1760_register(mem_res, irq, irqflags, &pdev->dev, devflags);
>  	if (ret < 0)
>  		return ret;
>  
> -- 
> 2.17.1




  parent reply	other threads:[~2021-12-20 15:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  1:04 [PATCH 0/6] usb: sound/soc: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2021-12-20  1:04 ` [PATCH 1/6] usb: host: fotg210: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-20 10:21   ` Geert Uytterhoeven
2021-12-20  1:04 ` [PATCH 2/6] usb: renesas_usbhs: " Lad Prabhakar
2021-12-20  1:04 ` [PATCH 3/6] usb: dwc3: Drop unneeded calls to platform_get_resource_byname() Lad Prabhakar
2021-12-20 10:47   ` Roger Quadros
2021-12-20  1:04 ` [PATCH 4/6] usb: isp1760: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-20 10:25   ` Geert Uytterhoeven
2021-12-20 15:37   ` Rui Miguel Silva [this message]
2021-12-20  1:04 ` [PATCH 5/6] usb: cdns3: Use platform_get_irq_byname() " Lad Prabhakar
2021-12-20 10:48   ` Roger Quadros
2021-12-20  1:04 ` [PATCH 6/6] usb: musb: dsps: " Lad Prabhakar
2021-12-21  7:51 ` [PATCH 0/6] usb: sound/soc: Use platform_get_irq*() variants to fetch IRQ's Greg Kroah-Hartman

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=CGK8O8M50JX6.3E0WU3HUN6K5W@arch-thunder \
    --to=rui.silva@linaro.org \
    --cc=a-govindraju@ti.com \
    --cc=b-liu@ti.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=peter.chen@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@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

all inboxes | Powered by JetHome®