From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbbCJIEj (ORCPT ); Tue, 10 Mar 2015 04:04:39 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:37551 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbbCJIEZ (ORCPT ); Tue, 10 Mar 2015 04:04:25 -0400 Date: Tue, 10 Mar 2015 09:04:21 +0100 From: Pavel Machek To: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Cc: Geert Uytterhoeven , Alexandre Courbot , Felipe Balbi , Bryan Wu , Richard Purdie , "linux-leds@vger.kernel.org" , Linux Kernel Mailing List , Linux OMAP Mailing List , "linux-gpio@vger.kernel.org" Subject: Re: RGB LED control (was Re: "advanced" LED controllers) Message-ID: <20150310080420.GA31091@amd> References: <20150219211424.GN13603@saruman.tx.rr.com> <20150302092111.GA19233@amd> <20150308205732.GA385@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 On Mon 2015-03-09 11:50:56, Måns Rullgård wrote: > Geert Uytterhoeven writes: > > > Hi Pavel, > > > > On Sun, Mar 8, 2015 at 9:57 PM, Pavel Machek wrote: > >> Ok, so I played with RGB LED a bit, and we have quite a gap in > >> documentation: what 50% brightness means is non-trivial and very > >> important in case we want to do smooth blinking and color transitions. > >> > >> Signed-off-by: Pavel Machek > >> > >> diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led > >> index 3646ec8..649d7a6 100644 > >> --- a/Documentation/ABI/testing/sysfs-class-led > >> +++ b/Documentation/ABI/testing/sysfs-class-led > >> @@ -8,6 +8,11 @@ Description: > >> non-zero brightness settings. The value is between 0 and > >> /sys/class/leds//max_brightness. > >> > >> + If LED supports continuous brightness settings, 50% brightness > >> + should correspond to 50% brightness perceived by human, in a similar > >> + manner pixel brightness on monitor does (not 50% PWM). > > > > How many drivers do it right? How many don't? > > > > For those that don't, perhaps we handle the conversion between perceived and > > pwm in the core, e.g. by adding a new flag to led_classdev.flags to indicate > > the need for conversion? > > Some LED controllers do the right thing in hardware, so any adjustment > done in the core needs to be optional. Do you have example controller that gets it right, btw? Bryan, can you apply the documentation patch so we can start fixing the drivers? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html