From patchwork Thu Oct 27 17:47:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9400065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1520460588 for ; Thu, 27 Oct 2016 17:49:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0956B2A329 for ; Thu, 27 Oct 2016 17:49:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F24382A334; Thu, 27 Oct 2016 17:49:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 857C02A329 for ; Thu, 27 Oct 2016 17:49:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzomz-0000ZG-CC; Thu, 27 Oct 2016 17:48:29 +0000 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49] helo=s-opensource.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bzomO-0000Gj-Jk for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2016 17:47:56 +0000 Received: from localhost (localhost [127.0.0.1]) by s-opensource.com (Postfix) with ESMTP id D3888A0E78; Thu, 27 Oct 2016 17:47:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com Received: from s-opensource.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4URqMbxDjWoa; Thu, 27 Oct 2016 17:47:43 +0000 (UTC) Received: from minerva.localdomain (unknown [181.121.136.80]) by s-opensource.com (Postfix) with ESMTPSA id 42232A1351; Thu, 27 Oct 2016 17:47:38 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: dts: exynos: Use macro for PWM signal polarity in Exynos5 boards Date: Thu, 27 Oct 2016 14:47:18 -0300 Message-Id: <1477590438-18095-2-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477590438-18095-1-git-send-email-javier@osg.samsung.com> References: <1477590438-18095-1-git-send-email-javier@osg.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161027_104752_851530_9C6644A2 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Russell King , Krzysztof Kozlowski , Javier Martinez Canillas , Rob Herring , Kukjin Kim , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Using the PWM_POLARITY_INVERTED macro instead of the hardcoded number 0 makes the DTS easier to read. Signed-off-by: Javier Martinez Canillas --- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 3 ++- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 +- arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 ++- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 3 ++- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 2 +- arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi | 5 +++-- arch/arm/boot/dts/exynos5800-peach-pi.dts | 3 ++- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi index 8f3a80430748..4df36f7263fd 100644 --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi @@ -12,6 +12,7 @@ #include #include #include +#include #include "exynos5250.dtsi" / { @@ -198,7 +199,7 @@ backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pwm 0 1000000 0>; + pwms = <&pwm 0 1000000 PWM_POLARITY_INVERTED>; brightness-levels = <0 100 500 1000 1500 2000 2500 2800>; default-brightness-level = <7>; enable-gpios = <&gpx3 0 GPIO_ACTIVE_HIGH>; diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts index c4de1353e5df..56adaac1f4ec 100644 --- a/arch/arm/boot/dts/exynos5410-odroidxu.dts +++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts @@ -40,7 +40,7 @@ fan0: pwm-fan { compatible = "pwm-fan"; - pwms = <&pwm 0 20972 0>; + pwms = <&pwm 0 20972 PWM_POLARITY_INVERTED>; cooling-min-state = <0>; cooling-max-state = <3>; #cooling-cells = <2>; diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 1f964ec35c5e..d83a12bb7112 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "exynos5420.dtsi" #include "exynos5420-cpus.dtsi" @@ -37,7 +38,7 @@ backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pwm 0 1000000 0>; + pwms = <&pwm 0 1000000 PWM_POLARITY_INVERTED>; brightness-levels = <0 100 500 1000 1500 2000 2500 2800>; default-brightness-level = <7>; power-supply = <&tps65090_fet1>; diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index 246d298557f5..791af504a79f 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" @@ -51,7 +52,7 @@ fan0: pwm-fan { compatible = "pwm-fan"; - pwms = <&pwm 0 20972 0>; + pwms = <&pwm 0 20972 PWM_POLARITY_INVERTED>; cooling-min-state = <0>; cooling-max-state = <3>; #cooling-cells = <2>; diff --git a/arch/arm/boot/dts/exynos5422-odroidxu4.dts b/arch/arm/boot/dts/exynos5422-odroidxu4.dts index 2faf88627a48..93ac1d201f16 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu4.dts +++ b/arch/arm/boot/dts/exynos5422-odroidxu4.dts @@ -24,7 +24,7 @@ blueled { label = "blue:heartbeat"; - pwms = <&pwm 2 2000000 0>; + pwms = <&pwm 2 2000000 PWM_POLARITY_INVERTED>; pwm-names = "pwm2"; max_brightness = <255>; linux,default-trigger = "heartbeat"; diff --git a/arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi b/arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi index 0ed30206625c..1e3d65d34167 100644 --- a/arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi +++ b/arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi @@ -12,6 +12,7 @@ */ #include +#include / { pwmleds { @@ -19,7 +20,7 @@ greenled { label = "green:mmc0"; - pwms = <&pwm 1 2000000 0>; + pwms = <&pwm 1 2000000 PWM_POLARITY_INVERTED>; pwm-names = "pwm1"; /* * Green LED is much brighter than the others @@ -31,7 +32,7 @@ blueled { label = "blue:heartbeat"; - pwms = <&pwm 2 2000000 0>; + pwms = <&pwm 2 2000000 PWM_POLARITY_INVERTED>; pwm-names = "pwm2"; max_brightness = <255>; linux,default-trigger = "heartbeat"; diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index f9ff7f07ae0c..b1bf73f51e9c 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "exynos5800.dtsi" #include "exynos5420-cpus.dtsi" @@ -35,7 +36,7 @@ backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pwm 0 1000000 0>; + pwms = <&pwm 0 1000000 PWM_POLARITY_INVERTED>; brightness-levels = <0 100 500 1000 1500 2000 2500 2800>; default-brightness-level = <7>; enable-gpios = <&gpx2 2 GPIO_ACTIVE_HIGH>;