Reputation: 3462
I am working on a android phone which supports USB OTG.
Suppose we connect a USB hub (bus-powered /self-powered) to the android phone and there is no device connected on the hub. Should the phone go into deep sleep (suspend)?
Upvotes: 1
Views: 2099
Reputation: 1182
Yes of course the phone should deep sleep in this case, it is up to the app to hold a wake lock if there was a special case to have the usb hub running.. think of the usb hub as an extension of your usb port. if your usb wants to sleep then the usb hub should too, regardless of whats on it. if the user has walked away from the tablet, then everything should sleep after a predetermined time.
The sourcecode related to USB sleep is this section of android code. https://github.com/mehrvarz/android_kernel_samsung_tuna/blob/jb/arch/arm/mach-omap2/board-tuna-connector.c
Upvotes: 1