linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Grygorii Strashko
	<grygorii.strashko-l0cyMroinI0@public.gmane.org>
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org,
	peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	jun.li-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org,
	nsekhar-l0cyMroinI0@public.gmane.org,
	b-liu-l0cyMroinI0@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources
Date: Tue, 7 Jun 2016 17:05:35 +0300	[thread overview]
Message-ID: <5756D4AF.8030103@ti.com> (raw)
In-Reply-To: <877fe1b0xx.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1733 bytes --]

On 07/06/16 16:09, Felipe Balbi wrote:
> 
> Hi,
> 
> (guys, please make sure to break lines at 80-columns)
> 
> Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> writes:
>>>>>> @@ -2853,6 +2852,23 @@ static irqreturn_t dwc3_interrupt(int irq, void *_evt)
>>>>>>    int dwc3_gadget_init(struct dwc3 *dwc)
>>>>>>    {
>>>>>>        int                    ret;
>>>>>> +    struct resource *res;
>>>>>> +    struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
>>>>>> +
>>>>>> +    dwc->irq_gadget = platform_get_irq_byname(dwc3_pdev, "peripheral");
>>>>>> +    if (dwc->irq_gadget <= 0) {
>>>>>
>>>>> Is it expected to get -EPROBE_DEFER here?
>>>>
>>>> Probably not as we don't have any chance of deferring probe here. We've already
>>>> probed successfully and are just turning on the gadget mode here.
>>>
>>> In general, you can't say that you've been probed successfully if not
>>> all resources are ready, and irq is a resource :) It's expected that
>>> all resources will be requested in probe, but here you are trying to
>>> get resource outside of probe. As result, it will be perfectly
>>> possible to get -EPROBE_DEFER here if on some HW GPIO IRQ will be
>>> used as peripheral, or host or otg irq (for example), because GPIO
>>> IRQ controller might not be ready at the moment when IRQ resource is
>>> requested.
>>
>> I agree with you.
>>
>> Felipe, are you ok with moving the IRQ resource obtaining code to probe?
> 
> You mean that probe() would setup all gadget_irq, otg_irq and host_irq
> while the other pieces (otg.c, gadget.c and host.c) only use it?
> 
> yeah, that should be fine. No problems.
> 
OK great. I'll fix this up then. Thanks.

cheers,
-roger


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-06-07 14:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 14:36 [PATCH v8 0/5] dwc3: omap: fixes and dual-role preparation Roger Quadros
2016-05-11 14:36 ` [PATCH v8 1/5] usb: dwc3: omap: use request_threaded_irq() Roger Quadros
2016-05-11 14:36 ` [PATCH v8 2/5] usb: dwc3: omap: Mark the interrupt handler as shared Roger Quadros
2016-05-11 14:36 ` [PATCH v8 3/5] usb: dwc3: omap: Don't set POWERPRESENT Roger Quadros
2016-05-11 14:36 ` [PATCH v8 4/5] usb: dwc3: omap: Pass VBUS and ID events transparently Roger Quadros
2016-05-11 14:36 ` [PATCH v8 5/5] usb: dwc3: core: cleanup IRQ resources Roger Quadros
2016-05-24  9:35   ` Felipe Balbi
2016-05-24 12:35     ` Roger Quadros
2016-06-01  7:46   ` [PATCH v9 " Roger Quadros
2016-06-01  8:06     ` Felipe Balbi
2016-06-07  9:28       ` Roger Quadros
2016-06-02 11:52     ` Grygorii Strashko
2016-06-07  9:34       ` Roger Quadros
     [not found]         ` <57569543.4090007-l0cyMroinI0@public.gmane.org>
2016-06-07 11:49           ` Grygorii Strashko
2016-06-07 12:44             ` Roger Quadros
2016-06-07 13:09               ` Felipe Balbi
     [not found]                 ` <877fe1b0xx.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-06-07 14:05                   ` Roger Quadros [this message]
2016-06-10  7:56             ` Roger Quadros
     [not found]       ` <57501E0D.4010007-l0cyMroinI0@public.gmane.org>
2016-06-10  8:02         ` Roger Quadros
2016-06-10  8:04           ` Roger Quadros
2016-06-10  8:18             ` Felipe Balbi
2016-06-10  8:32               ` Roger Quadros
2016-06-10  9:18                 ` Felipe Balbi
2016-06-10  8:11           ` Felipe Balbi
2016-06-10  9:56     ` [PATCH v10 " Roger Quadros
2016-06-10 10:39       ` Sergei Shtylyov
2016-06-10 11:35         ` Roger Quadros
2016-06-10 11:44           ` Sergei Shtylyov
2016-06-10 11:46             ` Roger Quadros
2016-06-10 12:22               ` Sergei Shtylyov
2016-06-10 11:48       ` [PATCH v11 " Roger Quadros

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=5756D4AF.8030103@ti.com \
    --to=rogerq-l0cymroini0@public.gmane.org \
    --cc=Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=b-liu-l0cyMroinI0@public.gmane.org \
    --cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
    --cc=jun.li-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nsekhar-l0cyMroinI0@public.gmane.org \
    --cc=peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    --cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.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).