public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Query] USB device autosuspend and its runtime usage count.
@ 2018-08-13  6:45 Anshuman Gupta
  2018-08-13  7:49 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Anshuman Gupta @ 2018-08-13  6:45 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-kernel, anshuman.gupta

Hi ,
I need to test a functionality with USB autosuspend with latest kernel          
Linux 4.18-rc8. I am trying to autosuspend a USB key board, i enabled       
its autosuspend by doing echo "auto" to its "control" attributes.
I am expecting USB keyboard to go to autosuspend after autosuspend_delay_ms.
But USB key board is not going to autosuspend because its runtime usage
count is not equal to zero.

Below are the log snippets:

root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_enabled
enabled
root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/control
auto
root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/autosuspend_delay_ms
2000
root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_status
active
root@intel-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_usage
1
root@intel-Kabylake-Client-platform:# sleep 60; cat /sys/bus/usb/devices/1-5/power/runtime_usage
1

My USB keyboard runtime usage reference count is not decreasing to zero.
Here am i missing something regarding runtime usage count or is it some issue with
my kernel or OS?

Thanks,
Anshuman Gupta.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-13 14:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-13  6:45 [Query] USB device autosuspend and its runtime usage count Anshuman Gupta
2018-08-13  7:49 ` Oliver Neukum
2018-08-13 10:45   ` Anshuman Gupta
2018-08-13 12:49     ` Oliver Neukum
2018-08-13 14:04     ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox