Re: [RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

From: Alan Stern
Date: Fri Aug 22 2014 - 10:00:59 EST


On Fri, 22 Aug 2014, Kiran Kumar Raparthy wrote:

> From: Todd Poynor <toddpoynor@xxxxxxxxxx>
>
> USB: OTG: Hold wakeupsource when VBUS present
>
> Enabled by default, can disable with:
> echo N > /sys/module/otg_wakeupsource/parameters/enabled
>
> This is one of the number of patches from the Android AOSP common.git tree,
> which is used on almost all Android devices. so I wanted to submit it for
> review to see if it should go upstream.

> --- a/drivers/usb/phy/Kconfig
> +++ b/drivers/usb/phy/Kconfig
> @@ -6,6 +6,14 @@ menu "USB Physical Layer drivers"
> config USB_PHY
> def_bool n
>
> +config USB_OTG_WAKEUPSOURCE
> + bool "Hold a wakeupsource when USB connected"
> + depends on PM_SLEEP
> + select USB_PHY
> + help
> + Select this to automatically hold a wakeupsource when USB is
> + connected, preventing suspend.

Without commenting on the appropriateness of this change, I'd like to
point out that users will not understand either the Kconfig symbol name
or the help text. The help text, especially, ought to be clear even to
people not very familiar with USB. Something more like this would be a
lot better:

Prevent the system from going into automatic suspend while
it is attached as a USB peripheral.

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/