Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp114953imu; Wed, 19 Dec 2018 14:45:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/Udoe2apquUEG/yAjq1dFqPHe3tAyfk6EzNievzdxxcBpc+KTPoNjCg8GesO9IUyvB0jMW1 X-Received: by 2002:a17:902:830a:: with SMTP id bd10mr22123597plb.321.1545259544148; Wed, 19 Dec 2018 14:45:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545259544; cv=none; d=google.com; s=arc-20160816; b=IrA8znO5mwt3d82VQSxRaK08jfk+gsdtBnZVAoXIWolDKlTNRIYDJ1HhhCCqnCLPeb P2gmxn5GmC2D+3T0VUrt/PpXMVzRI0MGELx0QfcxzGMme21mn68oFSi/wk2u3XK+gjqs 0OFWAl/g84E4k6TJIm9W+EQKOGunSKc7mwfM/KpOJX4RF1HjBCQGfDnD/s+nSyFUeQ++ 2N62dK0CvePi3XC2lJctRqHFlR3FARGxLzXQxWW5N7p5SC9g2C/Kol7fpwxBvLS1psNn TDKBogVoVLGtzCrG7lczTvE5lPEzbwR4pUlk7MH43lW/noumddQhIlwoX3BCbXR67law 73qQ== 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=FZ7YRuspYxIvaUPc1say6RRbQyDhMSMyJ9So9l/LdmQ=; b=NqIgWAXh2tWax5UX53A+J9W3xizfW/WZ9t7KTHiwOt1tTUX2hv47zPL/OSmQ2Nvaqz Y069fzaQMLtGTRvWc5rt2umFJ+eUT7TjNBDXpJ9fP110E46icYG52qftk+VVan3MKRUG z9whNf5qDKSizjizxAXN5XH8wLJjgwlyJKI6wMtKQr2bb+TeQid8qDy6axOzyct8MVcq ONe8a2w7EZesQ7KJyDyQPEHOPv+tMLxkdhQH/ak9j3GcrjRlVVwzg0+zSyXyKT4ZV7l6 ksyR4yq309sEFo/hlfB7vI0XOLPzHoNYySVUelahtNb32oOleMHLTOYPlD8triEkzAI+ tkCQ== 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 v184si16333177pgd.295.2018.12.19.14.45.28; Wed, 19 Dec 2018 14:45:44 -0800 (PST) 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 S1729904AbeLSW1l (ORCPT + 99 others); Wed, 19 Dec 2018 17:27:41 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:56247 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727502AbeLSW1k (ORCPT ); Wed, 19 Dec 2018 17:27:40 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 79EF180A9F; Wed, 19 Dec 2018 23:27:33 +0100 (CET) Date: Wed, 19 Dec 2018 23:27:37 +0100 From: Pavel Machek To: Dan Murphy Cc: jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, kernel list Subject: Re: [PATCH 2/2] leds: lp5024: Add the LP5024/18 RGB LED driver Message-ID: <20181219222737.GB30496@amd> References: <20181219162626.12297-1-dmurphy@ti.com> <20181219162626.12297-3-dmurphy@ti.com> <20181219193455.GA21159@amd> <8740cfd6-a6b5-ad27-313b-984a9febf18a@ti.com> <20181219201047.GA23448@amd> <54f28115-0a7d-8e9c-3bec-6e91fb3981ec@gmail.com> <20181219220326.GA28244@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i0/AhcQY5QxfSsSZ" Content-Disposition: inline In-Reply-To: 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 --i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! [cc list trimmed] > >>> I don't think a user needs nor would want to have 24 different LED no= des with 24 different brightness files. > >>> Or with the LP5036 that would have 36 LED nodes. > >>> > >>> Table 1 in the data sheet shows how the outputs map to the control ba= nks to the LED registers. > >> > >> Some time ago we had discussion with Vesa J=E4=E4skel=E4inen about pos= sible > >> approaches to RGB LEDs [0]. What seemed to be the most suitable > >> variation of the discussed out-of-tree approach was the "color" proper= ty > >> and array of color triplets defined in Device Tree per each color. > >> > >> Please refer to [0] for the details. > >> > >> [0] https://lkml.org/lkml/2018/11/9/938 > >=20 > > Yes, plus I also have the set of HSV patches somewhere... and they > > work, but I found out that HSV->RGB conversion results in loss of preci= sion. > >=20 > > We may want to do something like that. > >=20 > > But we need to do it once, in a driver core. We obviously don't want > > each driver having different version of RGB support. >=20 > True. But the RGB driver really should not be defining the color palette. >=20 > Maybe a "color capability" reported to user space so that the user space = can make the decision. >=20 > It can report >=20 > For GPIO or constant current situations > static red > static blue > static green=20 >=20 > For adjustable configurations it can report: > variable red > variable blue > variable green >=20 > or even simpler "static" or "dynamic" as a return to report the RGB confi= guration. > The LED driver would just need to set the variable. I'm not sure what static/variable is. I have RGB leds here that can set any channel to 0-255, at runtime. They seem to be quite common at phones. Anyway, if your 36 channels can be set independently, I believe you just want them to export as 36 LEDs. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --i0/AhcQY5QxfSsSZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwaxdkACgkQMOfwapXb+vIV3QCfcYJM8VPdCZQxaX0y9mrvxKRl FQ0AnRIzgL0rg5Yy6TRRBbLLSJSSKWrp =gkmt -----END PGP SIGNATURE----- --i0/AhcQY5QxfSsSZ--