From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: simon@mungewell.org, linux-input@vger.kernel.org,
Michael Bauer <michael@m-bauer.org>,
Michal Maly <madcatxster@gmail.com>
Subject: Re: [RFC] HID: hid-lg4ff g27 leds using LED subsystem
Date: Tue, 20 Mar 2012 00:48:54 +0000 [thread overview]
Message-ID: <1332204534.9740.81.camel@ted> (raw)
In-Reply-To: <alpine.LNX.2.00.1203191732570.18356@pobox.suse.cz>
On Mon, 2012-03-19 at 17:33 +0100, Jiri Kosina wrote:
> On Wed, 14 Mar 2012, simon@mungewell.org wrote:
>
> > > I'm posting this more as a 'Request for Comments' following on from
> > > Michal's patch this morning.
> >
> > One thing I note sure about is permissions, the LEDs register as
> > --
> > Mar 14 14:57:35 ubuntu kernel: [ 6462.204185] Registered led device:
> > 0003:046D:C294.0009::RPM1
> > Mar 14 14:57:35 ubuntu kernel: [ 6462.204251] Registered led device:
> > 0003:046D:C294.0009::RPM2
> > Mar 14 14:57:35 ubuntu kernel: [ 6462.204301] Registered led device:
> > 0003:046D:C294.0009::RPM3
> > Mar 14 14:57:35 ubuntu kernel: [ 6462.204354] Registered led device:
> > 0003:046D:C294.0009::RPM4
> > Mar 14 14:57:35 ubuntu kernel: [ 6462.204402] Registered led device:
> > 0003:046D:C294.0009::RPM5
> > --
> >
> > But I have to be root to perform
> > --
> > root@ubuntu:/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1/2-1:1.0/0003:046D:C294.0009/leds/0003:046D:C294.0009::RPM1#
> > echo 1 > brightness
> > --
> >
> > Is it possible to register so that all/any user can control the LED status?
>
> Looking at the code, I don't think that's possible. Adding Richard to CC,
> he definitely might have an opinion on this.
Whilst there is kernel side API you could potentially (ab)use, its not
encouraged or easy to do with the LED class attributes. Its really a
userspace policy issue. You can change the permissions on the files in
sysfs to reflect the access you require from something like udev.
Cheers,
Richard
prev parent reply other threads:[~2012-03-20 1:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 17:29 [PATCHv2 1/3] HID: hid-lg: Allow for custom device properties to be stored in private driver data Michal Malý
2012-03-14 18:13 ` [PATCHv3 " Michal Malý
2012-03-30 13:34 ` Jiri Kosina
2012-03-14 21:28 ` [RFC] HID: hid-lg4ff g27 leds using LED subsystem Simon Wood
2012-03-14 22:03 ` simon
2012-03-19 16:33 ` Jiri Kosina
2012-03-20 0:48 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332204534.9740.81.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=madcatxster@gmail.com \
--cc=michael@m-bauer.org \
--cc=simon@mungewell.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).