Thread (14 messages) 14 messages, 3 authors, 2014-03-14

Re: [PATCH v2 6/8] HID: sony: Add an IDA allocator to assign unique device ids

flat view

From: Frank Praznik <hidden>
Date: 2014-03-13 14:30:18

On 3/10/2014 18:25, Antonio Ospite wrote:
Hi Frank,

On Thu,  6 Mar 2014 17:32:54 -0500
Frank Praznik [off-list ref] wrote:
quoted
Add an IDA id allocator to assign unique, sequential device ids to Sixaxis and
DualShock 4 controllers.

Use explicit module init and exit functions since the IDA allocator must be
manually destroyed when the module is unloaded.

Use the device id as the unique number for the battery identification string.
Have you thought about using the bdaddr as the battery id?

I think that decoupling led numbers (from the following patch) and
battery ids would be saner. For instance in a scenario when userspace
decided that the _second_ sixaxis has LEDs saying "controller
3" (because of different kind of joypads, remember?) we would have
battery still saying "2" because the battery id is assigned at probe
time while LEDs can change at any time. This mismatch may become
confusing.
That's a good idea and it will match the naming scheme of the wiimote battery device, which I think is the only other game controller that reports battery status.  I'll make the change for v3.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help