Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5415926pxu; Thu, 22 Oct 2020 01:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8tJTyDDc068ZVuGbTDkfMVmvhNeibmhAOGXJtd8WV8tLurUq68V2IZgpMkgPX0LnN92jJ X-Received: by 2002:a17:906:95c5:: with SMTP id n5mr1235076ejy.111.1603355211568; Thu, 22 Oct 2020 01:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355211; cv=none; d=google.com; s=arc-20160816; b=csukn1hTpPAn+OK4H9G5af5/OpysQFQ771zObXum42RS/zT1pxh/TzTqrFz4n9b+Jy 24LiLvhqCE6BSDUC/o9sfzqvDhBsXrHkNFrP2b30uILAwBRMFgtKE9bQpnfB3VsP/Obc cAAH/fxw7KHHCZs+qWvE3KuARg3ify6ETCigHjeUVasJYSMa2JUpQShXE9AjUpHV1Tzd m15c9OqU8c7hcxunun9EolQ9qR0gPbs1xoMrIEdkjoLeU4XVQJgcEgDfIqHqbZGgS2K/ SZ46pu9f8ma74nj28tdoknaf0FP+g8v8MTpcdcAbu9JJ0os3nVG7kVuAW11ALcK404Nr Rwtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wpLYvGhuKyxRXzfVKDpynuN2d2Rj3ki47jaONctjv2M=; b=yazj2weyp1LLziAAW3Df4wowo6CwWm5IeWCXoLzqLf7gGiaJrK3d+tDmy23Bi/ADai NMlZGPx56/VzohOG/aOUJm4Qodxe0h0VkSmvSUsAtqnL19rsH4TprSDPnCfNuu5JF9kE ozoCz4aP6ZWK+GCLXNb0+dmfFymIEP0nDt6MDn85S2UMwR+NWHMSkA10H7tVpAVZDhaW /IO5EUBI9PliwpshWaRatlye3Dn53BH/102aScW/sJ3H7eXk6OcuyT2QlZ0C+smvUy8A t0nC1RU7ksnCNM9SHXclG7s/IpW7vuk5RviHHyVsvzxG5KNVpn1XQo/Y79PW8SC4xJYL ZbrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RBhmk4Yo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c11si679331edy.27.2020.10.22.01.26.29; Thu, 22 Oct 2020 01:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RBhmk4Yo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2507742AbgJVFFW (ORCPT + 99 others); Thu, 22 Oct 2020 01:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2443993AbgJVFFV (ORCPT ); Thu, 22 Oct 2020 01:05:21 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41036C0613CF for ; Wed, 21 Oct 2020 22:05:21 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id bh6so322964plb.5 for ; Wed, 21 Oct 2020 22:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wpLYvGhuKyxRXzfVKDpynuN2d2Rj3ki47jaONctjv2M=; b=RBhmk4Yoxh9jge/imYHKNgrjYeOVihPb1YzvKBi30BYoocMGuVr03u2v8Yh5x9HBY+ 9x+ZgOAWZy+tADrZRVw85qC71V6vjSqpprPTk7GaRbCkW9+/42aAwkMrHLTfeneklWye ZtEXbdQU53ltimT+Ktri5sDHtWTTQNfASUZ58= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wpLYvGhuKyxRXzfVKDpynuN2d2Rj3ki47jaONctjv2M=; b=dRGmsXCQbxuNOjPVP/rS7qzkO17WLlk5ha7eM7stADOte5UG05CSmC/g5ui9Ew8Ok3 bJmzonW7WrDzXRZWrzvvbbmgRC0BEL/jepJA0D/0iLikImzgzoQtj36qIsy39Bm8qV0V OilkApzu5GzVzfPhG6kIk+/WZvz1lpGsuiXvyqNBOnLVtlCgS2O1LIVuAPBCzfkJiH1k iNXuT6y4kHbut+Mt9adP4/idEpHSjnDd6Dfa9PfajRq/9dOd2ZwonrKH86n30Yys+wWS SDXuR5V8KL4EhxxmVSYofhkXKuxh8EBCocvM3xT9pyhudPAyPTTfmcrmtvQasQftY1Zu 0ojA== X-Gm-Message-State: AOAM533IOxbuA9XaZNH/X/+j84UTbhYY1C2oY8Nv2e8FxNKva0VVjdYr TPHNp95KEVov5OOVjffwxoBF7g== X-Received: by 2002:a17:90a:788a:: with SMTP id x10mr86917pjk.236.1603343120839; Wed, 21 Oct 2020 22:05:20 -0700 (PDT) Received: from alex-desktop.lan (c-73-63-253-164.hsd1.ca.comcast.net. [73.63.253.164]) by smtp.gmail.com with ESMTPSA id q16sm394954pfu.206.2020.10.21.22.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 22:05:20 -0700 (PDT) From: Alexandru Stan To: Heiko Stuebner , Rob Herring , Andy Gross , Bjorn Andersson , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz Cc: Douglas Anderson , Matthias Kaehlcke , Enric Balletbo i Serra , Alexandru Stan , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] arm64: dts: qcom: trogdor: Add brightness-levels Date: Wed, 21 Oct 2020 22:04:44 -0700 Message-Id: <20201021220404.v3.2.Ie4d84af5a85e8dcb8f575845518fa39f324a827d@changeid> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201022050445.930403-1-amstan@chromium.org> References: <20201022050445.930403-1-amstan@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We want userspace to represent the human perceived brightness. Since the led drivers and the leds themselves don't have a linear response to the value we give them in terms of perceived brightness, we'll bake the curve into the dts. The panel also doesn't have a good response under 5%, so we'll avoid sending it anything lower than that. Note: Ideally this patch should be coupled with the driver change from "backlight: pwm_bl: Fix interpolation", but it can work without it, without looking too ugly. Signed-off-by: Alexandru Stan --- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index bf875589d364..ccdabc6c4994 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -179,6 +179,15 @@ pp3300_fp_tp: pp3300-fp-tp-regulator { backlight: backlight { compatible = "pwm-backlight"; + /* The panels don't seem to like anything below ~ 5% */ + brightness-levels = < + 196 256 324 400 484 576 676 784 900 1024 1156 1296 + 1444 1600 1764 1936 2116 2304 2500 2704 2916 3136 + 3364 3600 3844 4096 + >; + num-interpolated-steps = <64>; + default-brightness-level = <951>; + pwms = <&cros_ec_pwm 1>; enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; power-supply = <&ppvar_sys>; -- 2.28.0