Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp405742iog; Wed, 15 Jun 2022 04:53:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sR9ZZZOWwRkW4tzUxpKcEuqFM8FsKT5ag+2cP2Y5jR55saBTNMm3mlOBAnzfQcO1Z/dsa6 X-Received: by 2002:a17:902:b218:b0:168:de55:dfba with SMTP id t24-20020a170902b21800b00168de55dfbamr9041033plr.134.1655294024215; Wed, 15 Jun 2022 04:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655294024; cv=none; d=google.com; s=arc-20160816; b=jsTe51u6AdXzdAHwC1A+JiLfKyJVUHoe4aBAmw4Zml3lO096KQfIUnYK/mTnXvD6A7 mm5SWi5nANxhHFz3xCNuPuVE0BX1UAj5yJ5nTByQx3q3MTkCEtt6F7KKrhKn4CgCp+HV s0Pf7+O1CocJCUy9EHcpBjEsb5K4p1K1cMSB7K2CCJjmzrJCoOXtyEiFL9ZWrAndM16Q AlXeLaMBEhoMVwLriTTpqRVc4agSVSkGw+WGq1D8WyWC0YV+v8ZKjbtZIV/Ixd60UzJd AW1MPjnr5Kd6eOJp7MrRjhbk8dhj91JIAwzNkMIwA6Z44XAIX2bnM1FPGPhjLndeqJw2 0nLQ== 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=zSTuZ2t7hCCrfuAfUAIkWHaObpQDE2fE3zF2HruldLs=; b=uY4EBv/crb+ee7FPBOW0oFVD4UzvJ4YieYseWBPJt2AeMnIg8MAu33X0+1AGKpmyIh fl5ZKTbgkNsKlJNNR5Q38ZeMRpk7fGdn4grOlRYai3Mx3nYtcBaQdkrREcLed8b2g0HS A7+FE6Balrq1xD8KmBBYnS57gePmBv7/swExsnYFEutLvVtCNjcmFE6XIb/tEXkFoDZ+ 1lspocQ63tmwWPyRnfVaJlcKmSW+KnOjJk853jmPF3hUEh9tjdHOM+doP1h/2vvZvUZP 6sozkk7eF+JIkUi3r4UmLBT5zQHabRmY6Vxff52bDVntXnxZlE8g82pPToy4FTG+eb24 aqyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ln5FWn03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s190-20020a632cc7000000b003c63c350186si16057049pgs.847.2022.06.15.04.53.32; Wed, 15 Jun 2022 04:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ln5FWn03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348302AbiFOLwD (ORCPT + 99 others); Wed, 15 Jun 2022 07:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347290AbiFOLvI (ORCPT ); Wed, 15 Jun 2022 07:51:08 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C16D5517FA; Wed, 15 Jun 2022 04:51:04 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id y19so22704033ejq.6; Wed, 15 Jun 2022 04:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zSTuZ2t7hCCrfuAfUAIkWHaObpQDE2fE3zF2HruldLs=; b=ln5FWn0385Z1emtIsEMSvzyPVQj600V8Xddp7sktlEE2o0X5IHEEJe+zZcziBxAeaI L079l5X5V8ABLgSAXShBMGIzRZTiZuo00hC+3agDHrNUITGdlo9DCBHbiLswo4IbNTTo W5pYechsn0C/VJHhuN1tsacXFrakv968FofRMYMl5lCkTHroC7wUi44O16uwCWLLmaTn 8++7kO4iu2SIgSwXgFhY8SrbLKho9wIEVsAnW+hUZ8UqPYOTfZDbW6tbIN0Afn5zatrL ioD5wWGvfonA3lLir+iFYUffgxw0LnsctVE634zARgMy4K+YjY4iWUQ3CV+OcIdy6A8j vsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zSTuZ2t7hCCrfuAfUAIkWHaObpQDE2fE3zF2HruldLs=; b=VNYxX4638yJu2LCtqG5qfTDJ5DGddbOyi2aDgg0LUgBNT+6jTcJ5EvkJtg1hgBLpOk GRZp606sDyERm5xDQ8ZCOLLLKW7czQxalDFeuOqrTcjCy5Kn6+brG97h9wekJVQE1d/W Jp0WAUO6BkiJIIOAVoDw7mxprmFlFJzzGi6AubNHCWGQ3WDNcnAY82E456ne4apsUe4z +RyMFaHJN3RKW605hjmVcVuUwRf/xPnpLHb8drcxs7XMXMaV7MsfvM1/KCj+9XfbGD5O +yCxpXOERheSv8KxJWUndTXqvt7GS46LpyfgKHOBArVRerq+S8svg7/vkVLi2yfp9Bmt mMUw== X-Gm-Message-State: AOAM530XrOsWzVho8ENb6w+zoyKjjK6xvTVajRSp7Z1RtJX8pP5JP4XJ aV4A+Bm21R1WRf+m8ipTJyw= X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr8581673ejc.617.1655293863270; Wed, 15 Jun 2022 04:51:03 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id t6-20020a17090616c600b00715a02874acsm4561158ejd.35.2022.06.15.04.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 04:51:02 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 16/18] ARM: dts: imx6q-apalis: backlight pwm: Simplify inverted backlight Date: Wed, 15 Jun 2022 13:50:04 +0200 Message-Id: <20220615115006.45672-17-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220615115006.45672-1-max.oss.09@gmail.com> References: <20220615115006.45672-1-max.oss.09@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Max Krummenacher Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0. With the change to use the PWM with inverted polarity the PWM signal is inverted to how it was before this patch. This changes the meaning of the values in the brightness-levels property. I.e. the duty-cycle changes from x/255 to (255-x)/255. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticeable. Change the brightness-levels to provide the same brightness-levels as before. Signed-off-by: Max Krummenacher --- (no changes since v1) arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 4ff46ffd2300..c134e71f2a09 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -6,6 +6,7 @@ */ #include +#include / { model = "Toradex Apalis iMX6Q/D Module"; @@ -19,13 +20,13 @@ backlight: backlight { compatible = "pwm-backlight"; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; - brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; - enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; power-supply = <®_module_3v3>; - pwms = <&pwm4 0 5000000>; + pwms = <&pwm4 0 5000000 PWM_POLARITY_INVERTED>; status = "disabled"; }; @@ -776,7 +777,6 @@ }; &pwm4 { - #pwm-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm4>; status = "disabled"; -- 2.20.1