From patchwork Wed May 11 11:59:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 12846101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59682C433EF for ; Wed, 11 May 2022 12:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CycBybb62LaH2rb7HKSfJX117DmOMF6/sFmZg5McRE8=; b=YjyVk5No+rEAA6 9Mc6GEqC4bTB1sfz4XDsPlqWtM8wxMegjFyVIgPLWhrBv5jhT9aHFUAMDmenGYyulPtoKYxyxsOFn RvCTvh7+DIPZNlJh9WQ9551O/T9hCt3KFfKsvx4500soGl7LxXflDT60hXIdIHAgJgAD9knngaExV WYnDDW2r4+oz++dQTVBKHraqyCZyfQ96+XMHkgC0Ng4agzgkhcHBZwNJVwK0Zu5aFMByTR1Y1/1Mq M+QDirigFa68PAtoIChR3yPvtln6hPwIWBzk0YYanIoBejRBR/L5TdgW8QHaRvgWwA0bXux01MGQg 3WxB+HhgJf8EAjRRrQtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nol0l-006bZA-0E; Wed, 11 May 2022 12:00:11 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nol0Z-006bUI-Fw for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2022 12:00:01 +0000 Received: by mail-ed1-x536.google.com with SMTP id p4so2327045edx.0 for ; Wed, 11 May 2022 04:59:58 -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=z9UUg/fQTsaqkN2h8KB+8rJP5/jfsoQ0IyVKGrfdu/4=; b=bX7HkIaoRGew6tEpswM1+CpQTkckKbCj2lnYq+HShOUZpzz+RfWZilYyN71yloU2uI ozyiwfQGWhSi7g+IzclDVQKRMv8hjB7jonUeVL9V8heuurAhq2C5G6iGiU2qmD6JWnRD ex/o125CBSZ6xJXfa6jS3NpnpebkYl5bUM/cih75cRfvYd5yYaU2FXTHFLfTXpwLJqm2 7h0XsORg+WcxwkQanXx3QMJw+RRviq2wPVxyNE4KmbvVK1zFo5Db5HBNcto6CdvpTlzv 90nbMW146FyRT035OgKdwKUcqY+aEoX5wMadvfSpTXuVTnX1ZEjitYya9oHC/S+t7jBK ZgvA== 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=z9UUg/fQTsaqkN2h8KB+8rJP5/jfsoQ0IyVKGrfdu/4=; b=Uo+trwaBeQpUstQFYONRKzESAVLihNll10qQYDzdmLhfDWr0JgKG0qMscBKZDd34YR NA7GkSyr/s2RE5/X5lOesMf1FjNA0aNGXzQkdYe1u8FrfAfc+1cyZU+3NR6TecAcNX0K YF+w3BCHeZwWpIDUaMKSWCuItTy84c4MIC5FEJJWdBMiwzHPMMAHGZyH8/5WTkh065tM XNA+lBbRtFVBj4VBXnEnyctSmY5crjNVqJbAiXwk+zE8gvE/2FEXLaomsMUt14QIfdNv t83pwE0jnWL2FS9Uc8hfkY9hD4ZY+i/2RqV3OSQyrVKIxIvYjEMBv8RniHJ0xbifMm58 fJKA== X-Gm-Message-State: AOAM531xebxLL++y02g+933d7rhwIZ4I2eg4hufdv80SQSWtMbpEOGDO ijtO0Q1eFin9vpwVQUTM7MM= X-Google-Smtp-Source: ABdhPJzxCvHM1I7LqhcNanhrQZI6z4CClwZqgmMIMSm/Hg8qiFB9Gdh0gSTe4+hoZrA1IWvHM7Pvsw== X-Received: by 2002:a05:6402:2790:b0:427:d09b:df82 with SMTP id b16-20020a056402279000b00427d09bdf82mr28621102ede.151.1652270397282; Wed, 11 May 2022 04:59:57 -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 g6-20020a50d0c6000000b0042617ba63aasm1089279edf.52.2022.05.11.04.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 04:59:56 -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 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight Date: Wed, 11 May 2022 13:59:09 +0200 Message-Id: <20220511115911.54960-4-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220511115911.54960-1-max.oss.09@gmail.com> References: <20220511115911.54960-1-max.oss.09@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_045959_568448_A641A93D X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. Signed-off-by: Max Krummenacher --- Changes in v2: - Split to two patches as proposed by Fabio Estevam arch/arm/boot/dts/imx6qdl-colibri.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index f0908b530f86..d91fae92c90a 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -6,6 +6,7 @@ */ #include +#include / { model = "Toradex Colibri iMX6DL/S Module"; @@ -13,13 +14,13 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; enable-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* Colibri BL_ON */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; power-supply = <®_module_3v3>; - pwms = <&pwm3 0 5000000>; + pwms = <&pwm3 0 5000000 PWM_POLARITY_INVERTED>; status = "disabled"; }; @@ -620,7 +621,6 @@ /* Colibri PWM */ &pwm3 { - #pwm-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm3>; status = "disabled";