Re: Building BarGraph with LED subsystem

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

 



>>>>> "simon" == simon  <simon@xxxxxxxxxxxxx> writes:

simon> Also I have a question about the default permissions on the LED
simon> controls; Is it possible to register LEDs so that users have
simon> write permission? At present the controls are only accessible
simon> as root.
>> 
>> udev is the answer here.  You probably want to make it so that the
>> LEDs are open to the user logged into the system console or currently
>> active Xsession.

simon> So what would be the best way to achieve this (once the code
simon> gets into kernel)? I mean so that 'Jane Doe' get the LEDs
simon> working when she plugs in her wheel...

Well, if you have an application that wants to control the wheel LEDs,
then it needs to plug in an discover whether the wheel exists, whether
it's got LEDs, etc.  All part of the HID subsystem as understand it. 

simon> At present the patch uses the devices ID's to register the LED's. ie.
simon> --

simon> Mar 14 14:57:35 ubuntu kernel: [ 6462.204185] Registered led device:
simon> 0003:046D:C294.0009::RPM1
simon> Mar 14 14:57:35 ubuntu kernel: [ 6462.204251] Registered led device:
simon> 0003:046D:C294.0009::RPM2
simon> Mar 14 14:57:35 ubuntu kernel: [ 6462.204301] Registered led device:
simon> 0003:046D:C294.0009::RPM3
simon> Mar 14 14:57:35 ubuntu kernel: [ 6462.204354] Registered led device:
simon> 0003:046D:C294.0009::RPM4
simon> Mar 14 14:57:35 ubuntu kernel: [ 6462.204402] Registered led device:
simon> 0003:046D:C294.0009::RPM5
simon> --

This part is probably fine, but I'd call it 'LED1..5' instead, since
they're LEDs, not true RPM indicators.  I guess what I'm trying to say
is that putting as much of this into user space, makes for a much more
flexible environment.

You might want to look into the Linux HID sub-system for how it
enumerates the abilities of devices like keyboards, game pads, etc.
They already have alot of that infrastructure in place. 

John

--
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