Re: [PATCH] usb: phy: am335x: Enable USB remote wakeup using PHYwakeup

From: Alan Stern
Date: Wed Dec 18 2013 - 13:21:46 EST


On Wed, 18 Dec 2013, Felipe Balbi wrote:

> Alan, any suggestions on how to handle wakeup correctly ? I mean, it
> should be enabled by default during runtime PM and disabled during
> system sleep.

During system sleep, it should be set according to the value of
device_may_wakeup().

> But when it comes to default state of can_wakeup field,
> what should we do ? Should the driver be fiddling with that ? Leave it
> to the bus driver ? Any tips ?

If the bus driver knows whether the hardware is capable of issuing a
wakeup request, it should set can_wakeup appropriately. In most cases
the device driver doesn't need to worry about it.

There are a few exceptions, though. If the bus code doesn't know
enough about the hardware, or if some hardware has a quirk that the
driver knows about but the bus code doesn't, for example.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/