lkml.org 
[lkml]   [2014]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: USB remote wakeup through gpio interrupt
Date


>
> > Hi,
> > There is some inconsistency in remote wakeup functionality in my
> > custom board. so I want to wakeup the runtime suspended USB host
> > through interrupt. My USB device is connected to the board through USB
> > interface and some gpios. device will give interrupt on processor gpio
> > when it needs attention of USB host. What should i do so that i can
> > wakeup the usb host when i get interrupt from the device.
>
> Have your gpio interrupt handler call pm_request_resume() for the host
> controller device.
>
> However, this may not do what you want. Since the root hub will remain
> suspended, the host controller will go back to low-power immediately
> after it is resumed. You really need to resume the USB device itself,
> not the host controller.
>

I think it is the same we echo on > ../power/control, you may need
to request gpio interrupt at your usb class driver, and call pm_runtime_get()
when the gpio interrupt is coming. After the device finishes using
usb, it can call pm_runtme_put through gpio interrupt.

Peter

> > My idea was to apply power management related hooks from the interrupt
> > handler, but I am not getting the clear idea.
> >
> > My main doubt is,
> > Will this mechanism be efficient as remote wakeup functionality?
>
> That's a hard question to answer without measurements. But it shouldn't
> matter, because you probably won't get more than one wakeup per second,
> right?
>
> Alan Stern
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>



\
 
 \ /
  Last update: 2014-03-06 06:44    [W:0.094 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site