0

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)?

Raj
  • 3,300
  • 8
  • 39
  • 67
  • Although this question doesn't belong here, but to answer "I don't think so", I have used as many as 4 USB at same time in 1 device to 0 USBs in HUB. But my devices never showed such behavior. – Ankit Bansal Feb 11 '15 at 12:02
  • I wanted to confirm if there was any Android specific configuration, which would make something like that happen. – Raj Feb 12 '15 at 08:27

1 Answers1

1

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

hamish
  • 1,141
  • 1
  • 12
  • 21