Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3999220imu; Mon, 28 Jan 2019 15:05:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN5tqVjcqavbwfQ8eXdcB4Wa7G8DRpKKL91YrnoCzFgWi+s2C5TzFyFfuvx8Shv8AiPUiW3K X-Received: by 2002:a62:5ec5:: with SMTP id s188mr23287982pfb.145.1548716705561; Mon, 28 Jan 2019 15:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548716705; cv=none; d=google.com; s=arc-20160816; b=Yu8sD4nTeKQp2Yh+i7afjgCb42f9aj8kuY0+De9N5WlfzUrUDeTo2WadYjU6YIIJCz pj1WHYqPi7RknexNsBESs4WUkVkxCUALKWuv7YuLHT9my1z2hZacn4YoOrUowuA7M46z 2+8w5pPGdE/qYSsd1VDUzYARlcOW/+L8/uushRSmHkYASfQXhB71j/ig3uQHjqgpkd3g 2Ye4wTsjxoRQnwM7R/bGy01UWypvPNsNCrjvdJiYAUUenFIfbxluLf8oE7hDUf+123vn eHOKjEXjR2zr/vdhV9OHwGloiK66oB6cnIdmasEnDmtvSQIgcV74iew5r3+36jkAYVIo TlJw== 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=6zpI3Ogei1x9V1i9mRb69pQgO4QW7E9HfK5jCgQufng=; b=F/LEpXSUwOZNnBIIhA1/5xPK+tuKLUf5Ds022wIcp/EvpFbxgyhaUOgDuB9QjLOkCM CarBzwumOrsi9Q3CNGuf+eHgbgc1oEm0g1CCkWSKGjeF7luIS6Nl47dOz/Z6uS9+LVqV JD+EfFBdQOCcS7Oc6IPPcZfONuS/FedZSMcxvvdmr/mZqImnOZa/Oer16g2L9ZngNHGD uGSqnMp7+oTiXt1NUM1KoxjjmBuxtPlph9wEJLIH/CNGYdeXql/ia9ZspKYdiqroXzeO nemjFBNkMEHqWhiI3LHkZtD1VQQEp4zb2ugpuNg7MgRajYMiJgwhrI6uaMhHG84OzXKg NOWg== 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 y189si34592244pfg.75.2019.01.28.15.04.49; Mon, 28 Jan 2019 15:05:05 -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 S1727048AbfA1XEM (ORCPT + 99 others); Mon, 28 Jan 2019 18:04:12 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:58927 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbfA1XEL (ORCPT ); Mon, 28 Jan 2019 18:04:11 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id E3B50801AD; Tue, 29 Jan 2019 00:04:02 +0100 (CET) Date: Tue, 29 Jan 2019 00:04:08 +0100 From: Pavel Machek To: Jacek Anaszewski Cc: Dan Murphy , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dachaac@gmail.com, robh+dt@kernel.org Subject: Re: RGB LED class Re: [PATCH v2 2/2] leds: lp50xx: Add the LP50XX family of the RGB LED driver Message-ID: <20190128230408.GB5728@amd> References: <20190115222223.GA17363@amd> <79394d17-3124-75b2-ccac-dc1046499d14@ti.com> <20190116105537.GA1803@amd> <86299268-3202-814a-134b-04bd2170faab@ti.com> <8dfa2854-2814-6874-ab8e-1858e9a18acf@gmail.com> <20190118000235.GB27661@amd> <61fa89eb-c12e-8f9c-9457-9d6d17ba7717@gmail.com> <20190119213629.GA3654@amd> <9d2e0220-69f0-faaa-adb9-13d905f9c51d@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline In-Reply-To: <9d2e0220-69f0-faaa-adb9-13d905f9c51d@gmail.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 --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>What algorithm would be used for mapping brightness levels to RGB values > >>in case of devices without hardware support for that? > > > >Output power =3D brightness / max_brightness * pwm_channel[x]. >=20 > IIUC you mean it as a formula for calculating r,g,b, values? > I.e., on brightness setting we would have to do this calculation for > each of three channels? >=20 > Then, it will result in changing hue as well. That's why we're > discussing HSV. It should not change the hue, AFAICT, modulo the rounding errors. > >>s/pwm/color/ > > > >s/pwm/power/ would work for me. >=20 > Power implies physical units. I'd prefer "intensity". Intensity would work for me, too. > >>Besides white also other color presets could be defined in DT. > > > >They should not be neccessary. When userspace knows what is white and > >that power is linear with values in power_channels, it should be able > >to do colorspace conversion itself. >=20 > Have you verified it in practice? Would it allow to convert RGB values > of the color displayed on the monitor to LED RGB class intensities, > allowing to achieve similar color on the LED? Yes, I think so. My code is in unicsy_demo repository, in monitor/notint.py . Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlxPimgACgkQMOfwapXb+vLTPACeMpWgjVPi9frKciJFP7fvH/CE 8v8AoIBkFjvwbnPWsHWUoVfg3EEBw3XX =cqao -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--