Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp801647ybl; Wed, 8 Jan 2020 06:09:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwkDiog4uVxhR5nM7Ws9+0h2VHF6BevTilX+PMDELjIu2wnZa2ePTxXh0KcG3249xwWxL9W X-Received: by 2002:aca:6108:: with SMTP id v8mr2995681oib.96.1578492596107; Wed, 08 Jan 2020 06:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578492596; cv=none; d=google.com; s=arc-20160816; b=E5+reDayJfj/d4eCa3r3NlgdgMEhJ6G51fEYTa0nI06LVfcwfotbtjKCSvNhf5nmo6 k/F1zZFZQGMlj+q8+RUv9d70vKchkKIpVh5a2oxczs9oFdaVeyPexflfjoamA5t16MaT QsdnvLUEfr06/wmZAqFsfTRRzZUiFdF9PHH1KdiBY4Sohvd+xWIdl07ICYHh1lCIgPjY /45sXq0DYRTuLjM7Zy/KWJJSoSMuCV8SiM1AOHm4sCB1uJKHfPRlrNtNa6oBhn4iFuZ/ wJveuAW7L3znBWaY6oxf1U1i9yekUmv3NWQ1LyN6rgX3IvuVEUrSuGHGxwwHNmvVUEzb nqeA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=0zNSDpTzWVglWsPnIFTCqu7Z2Vw/UAGkTt2uy9mxw5Q=; b=s4yyJdcvPQ0YF52cD7bEM2t7DSEtq6SSvNULw8FY7/bA7NCw1tFQ0qNfUAKdONCRLX zuHLJkgZBke8+62sawg2XJJ3lH/hKhlb/Q1L9LL19VIgNSf/DU/CuihD42i2cZ5UbrQc byAokG9MGjJw/MESrsMB6bsBH8A5PMWPpSvYBi51BgdNdtGghTobnW/9Ja1Uk9UpMlSk r/ERcVMhyibX/PRnS5XX1oXJgpf7r4AFdD6Ofe7MYX+PD5gHDjF7T0p3YA0xulruUPG7 9YmUAstcjsuPouEppdaXy39rOTcpEEP6UgTstcsGBfoMM9C/QuZPLg8efJtMO4nPHddB /ITQ== 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 v14si1804643oto.127.2020.01.08.06.09.40; Wed, 08 Jan 2020 06:09:56 -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 S1727905AbgAHMkI convert rfc822-to-8bit (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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