Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2935234ybi; Mon, 17 Jun 2019 13:04:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6GknclZlghOiQIGTNxhGe+f0Ieo6hUSFOLQ22tD5uE+pXWWoSlhS602CQ6vrF8q1d/njd X-Received: by 2002:a17:90a:1ac5:: with SMTP id p63mr698555pjp.25.1560801842741; Mon, 17 Jun 2019 13:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560801842; cv=none; d=google.com; s=arc-20160816; b=07/4vVQ57JQiN2Bc+Iy9jPwFODBZ8KNGj8bFZus4YWlMZ9OfSdnQj+/vPFBJHyiexm HLAJ3w0H2doJDprvGDc4olR+Lz4jnm0LPrprb9I15jJrfPKtuW86Qv5zIfckfK27VwfY TSN+YTrRJDahevnXxb+9r6g3AaiqgqcL/gYC58f4jRGg/yZLlxYWz1FzypjF6qMZzFnK oW4aOfbpyx177BS4TSoWiorVVqtEs3W+pGRhlfMX6/V0ZkDW8PMOv+NNjxMXa8qxYHNr YLsWIM+o7hTqJ+GQH+nU8dOKku5koCjOwXyBZilyLE0bJ2TBAoiNTX8A0GhCPr5KSsIU DAfA== 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:dkim-signature; bh=+6f59ZFOs1PSocx1cXbKIlzxOSpO4grS25QzNht0IBo=; b=Kzlgio59dlpMfxsp24E+JiYpRxMHtjCSjXoJnu2p8qSkYtmaDnaegSLedf/+f8R3p4 xp2L4HEaq+vuFt+bPU3BpwlIYmRPTVfwFc8VjmBreBcsOmMyg/8iwZFYJGXdfu/EbzMo 4iS+Xdo6NufkoMMh+haEK2EWPm8iPb45RJdah0Te4WG00NLChq7OMKY4GEhFaQLRO4QO PAYz9yHdjnaFvC9TC5XzVgsko7OQp2X8t6qAMDpI9vHHybo4QpnkxdMzeJwFCSQ0svY0 foAYN1rMcsOeVAde+kfXfeNOMc39s2hnksDbiHsk2oR3A5I0c9tCjxygGB4lKe8redqk qCcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HAUdFKJJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si4473533pgq.94.2019.06.17.13.03.47; Mon, 17 Jun 2019 13:04:02 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=HAUdFKJJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbfFQUDS (ORCPT + 99 others); Mon, 17 Jun 2019 16:03:18 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35250 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfFQUDS (ORCPT ); Mon, 17 Jun 2019 16:03:18 -0400 Received: by mail-pl1-f195.google.com with SMTP id p1so4580364plo.2 for ; Mon, 17 Jun 2019 13:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+6f59ZFOs1PSocx1cXbKIlzxOSpO4grS25QzNht0IBo=; b=HAUdFKJJhiMKymZJQB2BDPSJoE/iyuSm4Zoz28SB10+kykqiY9fWV8m3ZhHifNYLQ0 gianVGa6NRSwnraiQxQPnn47Y8vu2BUM9Ii2feCs9YyJI3a1/UdASYpWOtlBtcDsOoCE 4wNhyON7emBZtf6bZmyiPF2newLP+1pJGDKwE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+6f59ZFOs1PSocx1cXbKIlzxOSpO4grS25QzNht0IBo=; b=SVdJpMvkPm1ssmKKP0tE/f3myTnZBNdZ7syPdVt4XnxWpkMXtXKCxqWE028ZoslMgU WrRTtAy/9iXSL5v12pyJZe0K60qaWFRHncEUisJ3UYSMDnbUfNfmmiDOu1rVpZCemrFt accU64QfXNzLTSo3enOvm9sbyG6uIMllvE+mU8LA6rRR3zG01M/coQMHmpe/3UVuOuI3 iLiC3liYfLwC5GDTgA/nlW+e1zDct7Tp9+64rXQBsgnkKZnK3YZ3oPrH6Da3QgarZXp5 7RsmvgEVWrMvXmId5UA/k4URCxyAojatH29Mf7v/14DD7LlrCZ+WLeKoYDwXhvZMF700 H6UQ== X-Gm-Message-State: APjAAAXNh7/h7Eh+TtRyWRltCsJN9kTzRS7oRIcKrjqrmq9qxwdebIY0 Oo8BSI+LneH5PHcrnV1FfudH6g== X-Received: by 2002:a17:902:8c83:: with SMTP id t3mr82969184plo.93.1560801797840; Mon, 17 Jun 2019 13:03:17 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id a3sm13221952pfo.49.2019.06.17.13.03.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 13:03:16 -0700 (PDT) Date: Mon, 17 Jun 2019 13:03:14 -0700 From: Matthias Kaehlcke To: Pavel Machek Cc: Daniel Thompson , Brian Norris , Enric Balletbo i Serra , Doug Anderson , Rob Herring , Jingoo Han , Richard Purdie , Jacek Anaszewski , Guenter Roeck , Lee Jones , Alexandru Stan , linux-leds@vger.kernel.org, devicetree , Linux Kernel , kernel@collabora.com Subject: Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye. Message-ID: <20190617200314.GT137143@google.com> References: <20180208113032.27810-4-enric.balletbo@collabora.com> <20190607220947.GR40515@google.com> <20190608210226.GB2359@xo-6d-61-c0.localdomain> <20190610205233.GB137143@google.com> <20190611104913.egsbwcedshjdy3m5@holly.lan> <20190611223019.GH137143@google.com> <20190612110325.xdn3q2aod52oalge@holly.lan> <20190612192642.GK137143@google.com> <20190617130150.GA21113@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190617130150.GA21113@amd> 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 Mon, Jun 17, 2019 at 03:01:51PM +0200, Pavel Machek wrote: > Hi! > > > > Certainly "linear" (this device will work more or less correctly if the > > > userspace applies perceptual curves). Not sure about logarithmic since > > > what is actually useful is something that is "perceptually linear" > > > (logarithmic is merely a way to approximate that). > > > > > > I do wonder about a compatible string like most-detailed to > > > least-detailed description. This for a PWM with the auto-generated > > > tables we'd see something like: > > > > > > cie-1991,perceptual,non-linear > > > > > > For something that is non-linear but we are not sure what its tables are > > > we can offer just "non-linear". > > > > Thanks for the feedback! > > > > It seems clear that we want a string for the added flexibility. I can > > work on a patch with the compatible string like description you > > suggested and we can discuss in the review if we want to go with that > > or prefer something else. > > Compatible-like string seems overly complicated. I see the merit in the sense that it allows to provide more precision for if userspace wants/needs it, without requiring userspace to know all possible (future) options. If userspace wants to keep things simple it can just check for check for "s == 'non-linear'" and "s.ends_with(',non-linear')" In any case, I posted a first version of the patch: https://lore.kernel.org/patchwork/patch/1088760/ Maybe best to center the discussion there? > > > Instead one valid value for the sysfs should be "unknown" and this be > > > the default for drivers we have not analysed (this also makes it easy to > > > introduce change here). > > > > An "unknown" value sounds good, it allows userspace to just do what it > > did/would hace done before this attribute existed. > > What about simply not presenting the attribute when we don't have the > information? I'm open to either, I mentioned it earlier and Daniel seemed to prefer the 'unknown' value so I went with it in the first version (it's also slightly less code). Cheers Matthias