Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbdFFUNq (ORCPT ); Tue, 6 Jun 2017 16:13:46 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:44205 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbdFFUNp (ORCPT ); Tue, 6 Jun 2017 16:13:45 -0400 Date: Tue, 6 Jun 2017 22:13:42 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: fenglinw@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Purdie , Rob Herring , Mark Rutland , 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 Message-ID: <20170606201342.GB32171@amd> References: <20170601072723.12760-1-fenglinw@codeaurora.org> <8058ed85-5a64-8dc3-99ea-1ad8128e043d@gmail.com> <20170605211609.GA9035@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FkmkrVfFsRoUs1wW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1750 Lines: 56 --FkmkrVfFsRoUs1wW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > Actually, I'd just do single file, "rgb_brightness" with 3 > > values. Overhead of writing 3 values is pretty much 0. >=20 > 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 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --FkmkrVfFsRoUs1wW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlk3DPYACgkQMOfwapXb+vJ06wCeOst8aduqRiHtSFpzgzojv4fL 2pcAni1rUmGq/T70v9M+zuQwB5u3hR7C =AMl9 -----END PGP SIGNATURE----- --FkmkrVfFsRoUs1wW--