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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

On Thu,  6 Mar 2014 17:32:54 -0500
Frank Praznik <frank.praznik@xxxxxxxxx> wrote:

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux