Re: [PATCH] HID: add new gamepad LED constants

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

 



> LEDs should be controlled via LED subsystem. The fact that they happen
> to be located on a given device does not mean they belong to input
> subsystem. The same as LEds on network card are not part of network stack,
> etc.

I think the fundamental difference for me is that the primary input
standard does
have a specification for how to interact with LEDs, and right now the LED
subsystem has no knowledge of HID whatsoever.

Even if I did add the plumbing for HID over into the LED subsystem, is there an
easy way to correlate input devices and their LEDs from userspace?


On Mon, Sep 15, 2014 at 3:58 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> Hi David,
>
> On Tue, Sep 16, 2014 at 12:15:08AM +0200, David Herrmann wrote:
>> Hi
>>
>> On Mon, Sep 15, 2014 at 11:57 PM, Dmitry Torokhov
>> <dmitry.torokhov@xxxxxxxxx> wrote:
>> > On Mon, Sep 15, 2014 at 11:03:47AM -0700, Michael Wright wrote:
>> >> > Why not introduce all 8 player LEDs as described in the document? You
>> >> > should be safe increasing LED_MAX to 0x1f.
>> >>
>> >> Wasn't sure if it was safe to bump it since it could potentially break apps
>> >> until they recompile against the new API.
>> >
>> > I'd rather we did not add any new input LED definitions but rather
>> > looked into switching to LED subsystem, at least for new LEDs.
>>
>> Why?
>
> Because we have a proper subsystem that represents LEDs.
>
>> The LED subsystem lacks any unprivileged API to control LEDs.
>
> As far as I can see it is the same as for input devices. You just need
> to make sure the device owner can access needed attributes, such as
> brightness.
>
>> There's no cdev to control write-access to the LED API. /sys has never
>> been intended as unprivileged API
>
> chmod/chown works just fine on sysfs attributes.
>
>> so I'd really prefer if we add
>> proper input codes to control those. At least I cannot see the
>> advantage of the led subsystem over input EV_LED codes. Care to
>> elaborate?
>>
>
> LEDs should be controlled via LED subsystem. The fact that they happen
> to be located on a given device does not mean they belong to input
> subsystem. The same as LEds on network card are not part of network stack,
> etc.
>
> Thanks.
>
> --
> Dmitry



-- 
Michael Wright
Android Frameworks
--
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