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: 9400059 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 5337060588 for ; Thu, 27 Oct 2016 17:48:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47BFC2A321 for ; Thu, 27 Oct 2016 17:48:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C49F2A329; Thu, 27 Oct 2016 17:48:17 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85DDC2A321 for ; Thu, 27 Oct 2016 17:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935100AbcJ0Rrj (ORCPT ); Thu, 27 Oct 2016 13:47:39 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:49775 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934036AbcJ0Rrg (ORCPT ); Thu, 27 Oct 2016 13:47:36 -0400 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 Cc: Javier Martinez Canillas , devicetree@vger.kernel.org, Kukjin Kim , Russell King , linux-samsung-soc@vger.kernel.org, Rob Herring , Mark Rutland , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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>;