Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991AbcCaIRt (ORCPT ); Thu, 31 Mar 2016 04:17:49 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:61959 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752233AbcCaIRm (ORCPT ); Thu, 31 Mar 2016 04:17:42 -0400 X-AuditID: cbfec7f4-f796c6d000001486-82-56fcdd222510 Message-id: <56FCDD20.6060406@samsung.com> Date: Thu, 31 Mar 2016 10:17:36 +0200 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Heiner Kallweit Cc: Pavel Machek , pali.rohar@gmail.com, sre@kernel.org, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, Patrik Bachan , serge@hallyn.com, Greg KH , linux-leds@vger.kernel.org, Benjamin Tissoires , Linux Kernel Mailing List , Linux USB Mailing List Subject: Re: [PATCH v5 1/4] leds: core: add generic support for RGB Color LED's References: <56D608ED.2090406@gmail.com> <20160329100258.GA24964@amd> <56FAE7A8.2070302@gmail.com> <20160329214323.GA10455@amd> <56FB893C.60203@samsung.com> <20160330130319.GB19994@amd> In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e/4ZV2lu3/CDFb2aFmseeFgcX3KZlaL cwtmMFosej+D1WLJlUPsFk83P2ayuLxrDpvF1jfrgBLLWpktJp7+zWSx8GYTs8XdU0fZLM5f OMducXp3iQOfx85Zd9k9ru2O9Dj8dSGLx6ZVnWwebx8GeLzfd5XNY8Xq7+wenzfJBXBEcdmk pOZklqUW6dslcGU8bnvEXrBUuKL1fD9TA+Nu/i5GTg4JAROJ9gXPmCFsMYkL99azdTFycQgJ LGWUeLNsKxOE84xRYuWdmWBVvAJaEvtX32HsYuTgYBFQlXjzng8kzCZgKPHzxWsmEFtUIELi z+l9rBDlghI/Jt9jAbFFgFonvF4DtoBZYBWzxM5L/xhBEsIC/hLnPzYyQyxrYZL42byWDSTB KRAsse7ZSrDFzAJmEo9a1kHZ8hKb17xlnsAoMAvJkllIymYhKVvAyLyKUTS1NLmgOCk911Cv ODG3uDQvXS85P3cTIySKvuxgXHzM6hCjAAejEg+vZtqfMCHWxLLiytxDjBIczEoivH+vAIV4 UxIrq1KL8uOLSnNSiw8xSnOwKInzzt31PkRIID2xJDU7NbUgtQgmy8TBKdXAOOfijheFtrnn Db1/M77l0rnU9V9r85wVix11dn65/UbpoL1e6m15942l08+08M8L5WwsmZYrud/0+68X/19f it2t8iKYWfnh2b9dGlMkT1a3W8tte8n+dplueWb0khOXeD9s//Px1KkVp1NvJn55bXU/b/Zk yxfSRgfiVRX+PTI/uFZx1qturhQlluKMREMt5qLiRADo9sMGngIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2405 Lines: 64 Hi Heiner, On 03/30/2016 03:59 PM, Heiner Kallweit wrote: > On Wed, Mar 30, 2016 at 3:03 PM, Pavel Machek wrote: >> Hi! >> >>>> Ok, so: >>>> >>>> a) Do we want RGB leds to be handled by existing subsystem, or do we >>>> need separate layer on top of that? >>>> >>>> b) Does RGB make sense, or HSV? RGB is quite widely used in graphics, >>>> and it is what hardware implements. (But we'd need to do gamma >>>> correction). >>>> >>>> c) My hardware has "acceleration engine", LED is independend from >>>> CPU. That's rather big deal. Does yours? It seems to be quite common, >>>> at least in cellphones. >>>> >>>> Ideally, I'd like to have "triggers", but different ones. As in: if >>>> charging, do yellow " .xX" pattern. If fully charged, do green steady >>>> light. If message is waiting, do blue " x x" pattern. If none of >>>> above, do slow white blinking. (Plus priorities of events). But that's >>>> quite different from existing support...) >>> >>> Please note that HSV colour scheme allows to neatly project monochrome >>> brightness semantics on the RGB realm. I.e. you can have fixed >>> hue and saturation, and by changing the brightness component a perceived >>> colour intensity can be altered. >> >> I see HSV has some advantages. But we already have LEDs with multiple >> colors, and kernel already handles them: >> >> pavel@duo:~$ ls -1 /sys/class/leds/ >> tpacpi:green:batt >> tpacpi:orange:batt >> >> This is physically 2 leds but hidden under one indicator, so you got >> "off", "green", "orange" and "green+orange". > > That's a good example. As long as you can recognize green+orange as > separate lights/colors > (w/o magnifying glass) I wouldn't call it "a LED with multiple colors" > but "multiple > LED devices". > > In my use case we talk about RGB LEDs like the commonly used 5050 SMD RGB LEDs. > And it's not only about using a handful of discrete colors but about > displaying any arbitrary > color. > So far the kernel exposes the physical RGB LEDs as separate LEDs only > and I can't use > a trigger to e.g. set "magenta with 50% brightness". I think that we should consult more people before pushing the solution upstream. Would you mind writing a message with an explanation of the issue to linux-api list? Please keep in mind also the information from the "Attributes" section of Documentation/filesystems/sysfs.txt. -- Best regards, Jacek Anaszewski