Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1915544ybn; Thu, 26 Sep 2019 04:15:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzR5c1j22X8AXYeHIsHRJ2cZ0befJK9TrKtZDlMoDgU/zUBRr/RYGWOv4OeMT0GTfpAbnWd X-Received: by 2002:aa7:ce8b:: with SMTP id y11mr2888415edv.231.1569496507835; Thu, 26 Sep 2019 04:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569496507; cv=none; d=google.com; s=arc-20160816; b=lJZdV8N3S/OGv31p5w2SE42REwhWvNdKEK9UL+7FLiDun5UpJjyoA6ucMF/XQ6Qhxk uWXPYSR+cBN+RDLjNya9/E/rNNh/SF2zJNHpiWcgNNzD83qPSs9P73fc2YwVJjUPWGNi 9hMbn6vDfKLF/tBrNDhYeoJe3DSRf4knl6TcmMHa7G8IBd01DwBT3pwoMfSNWQbZmg4p y5Hkev7UQGg5c+ZVQv6BRovjXh2SMSg3TqgjVizPfgHPx0w+fKTyUtMdhcNOAMqc8aZZ E/NiE6w2SXE58A7CQx/5lu4UD45ft94nQkTubsbV3kFWZyqh7Z4b7PynB98UMRqIsmcz zHwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yfnC82KqwlWZX+ItBFbIRaLmeBGCimBkLksd5j+W5Mw=; b=nhpHZ5Qpgm+jBdD0FF/eRIDrXq9xb67UyXewlAMCGlgbRbdsV8uwSXXDRy7rsz5pWo urCXBgoBT4QTAK+i9fzfVuuaNnHmgt3zi8nvEUJGEOM3g68k2lxZUFDsQrA75JD3Uscw XBF6/goYF+uSMJZRtYRufQqP2sfW6/+vQd/lH3lcU8lc4ypHcocXAQg6zI3e0QmBDPcS 7yZxOnbs9fyg/XwBby6LrxtuFkTJuusIhXK0HXyTTfttMSH6vEjWG+ZitnBZIMteewDA DBr3ATWFW6JC1z6wbzg0X5avlrxZoBKkZWJ9Nm5CKc6h2sLw6bsEVicAopt0nkkgkRzR 0wdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id np3si794547ejb.384.2019.09.26.04.14.44; Thu, 26 Sep 2019 04:15:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725861AbfIZLKs (ORCPT + 99 others); Thu, 26 Sep 2019 07:10:48 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47284 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbfIZLKr (ORCPT ); Thu, 26 Sep 2019 07:10:47 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 920F68073E; Thu, 26 Sep 2019 13:10:29 +0200 (CEST) Date: Thu, 26 Sep 2019 13:10:43 +0200 From: Pavel Machek To: Dan Murphy Cc: jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, shawnguo@kernel.org, Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Tony Lindgren , =?iso-8859-1?Q?Beno=EEt?= Cousson Subject: Re: [PATCH v9 01/15] leds: multicolor: Add sysfs interface definition Message-ID: <20190926111043.GA9310@amd> References: <20190925174616.3714-1-dmurphy@ti.com> <20190925174616.3714-2-dmurphy@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <20190925174616.3714-2-dmurphy@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > diff --git a/Documentation/leds/leds-class-multicolor.rst b/Documentation= /leds/leds-class-multicolor.rst > new file mode 100644 > index 000000000000..87a1588d7619 > --- /dev/null > +++ b/Documentation/leds/leds-class-multicolor.rst > @@ -0,0 +1,96 @@ > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Multi Color LED handling under Linux > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +The multi color class groups monochrome LEDs and allows controlling two > +aspects of the final combined color: hue and lightness. The former is > +controlled via _intensity files and the latter is controlled > +via brightness file. > + > +For more details on hue and lightness notions please refer to > +https://en.wikipedia.org/wiki/CIECAM02. > + > +Note that intensity files only cache the written value and the actual > +change of hardware state occurs upon writing brightness file. This > +allows for changing many factors of the perceived color in a virtually > +unnoticeable way for the human observer. So unlike previous versions, userspace will need to write 4 files instead of one in the common case. > +Directory Layout Example > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +root:/sys/class/leds/rgb:grouped_leds# ls -lR colors/ > +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 red_max_intensity > +--w--wx-w- 1 root root 4096 Jul 7 03:10 red_intensity > +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 green_max_intensity > +--w--wx-w- 1 root root 4096 Jul 7 03:10 green_intensity > +-rw-rwxr-- 1 root root 4096 Jul 7 03:10 blue_max_intensity > +--w--wx-w- 1 root root 4096 Jul 7 03:10 blue_intensity Permissions are way off here. > +A user first writes the color LED brightness file with the brightness le= vel that > +is necessary to achieve a blueish violet output from the RGB LED group. > + > +echo 138 > /sys/class/leds/rgb:grouped_leds/red_intensity > +echo 43 > /sys/class/leds/rgb:grouped_leds/green_intensity > +echo 226 > /sys/class/leds/rgb:grouped_leds/blue_intensity No, you can't tell what kind of color this will result in. Will you be on ELCE/OSS in Lyon? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl2MnLMACgkQMOfwapXb+vILagCeOf78G3cZfahKAYIBij0zbt7n 2pwAoLQrjSBz+1Qdgi/kjANengzMfcM2 =mTZW -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--