Thread (8 messages) 8 messages, 4 authors, 2017-01-19

Re: Method to power off HID device from driver?

flat view

From: Cameron Gutman <hidden>
Date: 2016-12-07 03:20:08

Hi,
On Dec 6, 2016, at 4:25 PM, Roderick Colenbrander [off-list ref] wrote:

Hi,

I looked a bit deeper and found EV_PWR, though it isn't clearly
defined, but it is used in some places for purposes like this. Would
this be an acceptable method?
I am interested in this too. I recently implemented the ability to
turn off wireless Xbox 360 controllers in [0], but there is no way
to activate this functionality without suspending the whole system.
Some folks [1] have asked for this ability in other scenarios.

[0]: Commit f712a5a05228058f6b74 ("Input: xpad - power off wireless
                                   360 controllers on suspend")
[1]: https://github.com/paroj/xpad/issues/52
Thanks,
Roderick

On Thu, Dec 1, 2016 at 6:05 PM, Roderick Colenbrander
[off-list ref] wrote:
quoted
Hi,

Some of the devices I'm dealing with have methods to disconnect the
device through HID reports. This is mostly useful for wireless devices
to save battery and power them off e.g. when no activity in a wihle or
user wants to turn device off (some devices don't have a power off
button).

I was trying to figure out if it there is some generic way without
inventing a driver specific method. So far I haven't found anything on
the HID side. The use case is not that common often a user would
unplug a cable, but for some devices there is no real other way.

The closest thing I found was 'poweroff' as supported by device power
management spec:
https://www.kernel.org/doc/Documentation/power/devices.txt. The HID
drivers only support a subset of this so far.

Does anyone have a good suggestion for handling this?

Thanks,
Roderick


-- 
Roderick Colenbrander
Senior Manager of Software Engineering
Gaikai, a Sony Interactive Entertainment Company
roderick@gaikai.com
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help