From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: fenglinw@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
subbaram@quicinc.com, aghayal@qti.qualcomm.com,
wruan@quicinc.com, kgunda@qti.qualcomm.com
Subject: Re: [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module
Date: Tue, 6 Jun 2017 22:13:42 +0200 [thread overview]
Message-ID: <20170606201342.GB32171@amd> (raw)
In-Reply-To: <e4efce59-f611-14e5-1d11-09cb660585b2@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
Hi!
> >> Generally I came to a conclusion that it will be best to register
> >> additional LED RGB class device in an addition to three LED class
> >> devices representing each color. In order to avoid hard to solve
> >> locking problems I propose to allow for simultaneous access to LED
> >> class devices and LED RGB class device gathering them.
> >>
> >> All in all, currently we also don't give an exclusive access to
> >> a particular LED class device, which always can lead to overwriting
> >> current brightness by another process. These issues must be arbitrated
> >> by user space.
> >>
> >> I propose that LED RGB class device exposed following files:
> >>
> >> - red_brightness
> >> - green_brightness
> >> - blue_brightness
> >> - latch_color
> >
> > Actually, I'd just do single file, "rgb_brightness" with 3
> > values. Overhead of writing 3 values is pretty much 0.
>
> You've always been strongly in favor of one-value-per-file
> sysfs rule of thumb, but I'm OK with this approach as well :-)
Being values of same type (etc), this is actually permitted. And it is
better than hack with latch_color :-).
Good.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-06-06 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 7:25 [PATCH V2 1/2] leds: leds-qti-rgb: Add LED driver for QTI TRI_LED module fenglinw
2017-06-04 18:33 ` Jacek Anaszewski
[not found] ` <8058ed85-5a64-8dc3-99ea-1ad8128e043d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-05 21:16 ` Pavel Machek
2017-06-06 20:07 ` Jacek Anaszewski
2017-06-06 20:13 ` Pavel Machek [this message]
[not found] ` <20170601072723.12760-1-fenglinw-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-06-07 22:08 ` Rob Herring
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=20170606201342.GB32171@amd \
--to=pavel@ucw.cz \
--cc=aghayal@qti.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=fenglinw@codeaurora.org \
--cc=jacek.anaszewski@gmail.com \
--cc=kgunda@qti.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.net \
--cc=subbaram@quicinc.com \
--cc=wruan@quicinc.com \
/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).