[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS0PR01MB5922CCF2F3DD6763EAF1F2E3864A9@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date: Mon, 29 May 2023 13:20:17 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Marc Zyngier <maz@...nel.org>
CC: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Zheng Wang <zyytlz.wz@....com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
"linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH] usb: gadget: udc: renesas_usb3: Fix RZ/V2M
{modprobe,bind} error
Hi Marc,
> Subject: Re: [PATCH] usb: gadget: udc: renesas_usb3: Fix RZ/V2M
> {modprobe,bind} error
>
> On Mon, 29 May 2023 11:03:27 +0100,
> Biju Das <biju.das.jz@...renesas.com> wrote:
> >
> > > Do you understand the meaning of the "dev" parameter you pass to
> > > devm_request_irq()?
> >
> > Yes, the resource is managed with particular device.
>
> So what does it tell you about the life cycle of the interrupt you
> request with the *wrong* device?
It is not *wrong* device, it just parent device, which is telling
its child to manage it.
I agree, using parent device is wrong here.
>
> > I should not use devm_request_irq here. rather should use request_irq
> > and free_irq during unload with parent device handle.
>
> No, that's just papering over the real issue. You should just get the
> driver that handles the interrupt to request it. Anything else is a
> design bug.
Got it, but I guess, by using devm_request_irq() with child device is not a design bug
In a real life situation, for eg: A parent owns a property,
Parent is thinking it is efficient to handle the property by its child
rather than him. So it can tell its child to manage the property.
The parent share the property details and child manages it efficiently.
Cheers,
Biju
Powered by blists - more mailing lists