From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1F71C33CA1 for ; Wed, 8 Jan 2020 12:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF10D206DA for ; Wed, 8 Jan 2020 12:40:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgAHMkI convert rfc822-to-8bit (ORCPT ); Wed, 8 Jan 2020 07:40:08 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:39130 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbgAHMkI (ORCPT ); Wed, 8 Jan 2020 07:40:08 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 22CFCFB02; Wed, 8 Jan 2020 13:40:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oPyIRY5MccmG; Wed, 8 Jan 2020 13:40:02 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id E318F49D3D; Wed, 8 Jan 2020 13:40:00 +0100 (CET) Date: Wed, 8 Jan 2020 13:40:00 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Pavel Machek Cc: Jacek Anaszewski , Dan Murphy , Rob Herring , Mark Rutland , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Exponential LED brightness Re: [PATCH v4 0/6] leds: lm3692x: Allow to set ovp and brigthness mode Message-ID: <20200108124000.GA21245@bogon.m.sigxcpu.org> References: <20200107133119.GA3825@duo.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20200107133119.GA3825@duo.ucw.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Hi Pavel, On Tue, Jan 07, 2020 at 02:31:20PM +0100, Pavel Machek wrote: > Hi! > > > Overvoltage protection and brightness mode are currently hardcoded > > as 29V and disabled in the driver. Make these configurable via DT. > > > > This v4 moves the exponential brightness mode to the back of the series > > as per Pavel's request: > > > > https://lore.kernel.org/linux-next/20200106103233.GA32426@amd/T/#m93270a9bf10b88e060f4e4cf5701c527476de985 > > > > The end result is identical and i've tested everything still works when > > dropping the last to patches and checked compiltion via > > Thank you. Applied 1-4 (with some reformatting of changelog, and > led->LED). > > Exponential mode: > > We should decide if LEDs should be linear or not. Most LEDs are linear > now, and we may want to make it part of the API. Additional advantage > is that linear is "well defined". It is actually quite important for > RGB LEDs, because you get wrong colors otherwise. > > (Non-linear can have advantages, too... like needing less bits.) > > So, my suggestion is to document LEDs as linear, and leave > exponential->linear conversion to someone else. That would mean doing a conversion in the kernel that can be done by the chip. Would exposing non-linearity like in /sys/class/backlight//scale be an option? Cheers, -- Guido > > Best regards, > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html