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

Re: Method to power off HID device from driver?

From: Roderick Colenbrander <hidden>
Date: 2017-01-10 02:28:12

On Wed, Dec 7, 2016 at 7:39 PM, Bastien Nocera [off-list ref] wrote:
On Tue, 2016-12-06 at 19:20 -0800, Cameron Gutman wrote:
quoted
Hi,
quoted
On Dec 6, 2016, at 4:25 PM, Roderick Colenbrander <roderick@gaikai.
com> 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
Ditto the PS3 BD remote driver, when moving to the kernel, lost its
ability to suspend after X minutes, which drains the AA batteries
inside it.

In the original system, the remote would get disconnected after less
than a couple of minutes, and reconnect as soon as you pressed a
button, and make sure that button got sent to the device.

Would be great if we could control this from user-space.
From the sounds of it various others are interested in the ability to
trigger a device disconnect as well. Since I don't think any of us
have a good enough understanding of the HID / input frameworks, I'm
adding Benjamin and Jiri. Maybe they have some good ideas on how to
tackle this.

Thanks,
Roderick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help