From patchwork Fri May 25 15:51:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10486489 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 A479A6038C for ; Mon, 25 Jun 2018 14:51:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1A41285DD for ; Mon, 25 Jun 2018 14:51:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FEBF285CB; Mon, 25 Jun 2018 14:51:20 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C426C2861E for ; Mon, 25 Jun 2018 14:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References:Date:Subject:To:From: Message-ID:MIME-Version:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Owner; bh=RZYgOXXWxiYmVP9xX0ml1XArrOpaq9vi/GQjZBvyMRk=; b=kK IJdu+JtzkTgQ2gYQFabw5KXgOMbMrki7XsUVvEsGUOUrQmMHeKCoSx6ULN/Ok2L+FjlfwqTXolpgQ x1RcAq8sEqg1dSBB9e1lSS8K7oRaP+NFRWzXyiCSlvZvAIt6cKu3M6TLHqwE++XTTWzH6vJzkCNyV 0obZFlrxg77FnLT3kIAw0YrW17FM2rLiYoepNrW9z4GJShLnAdBI+oRgSxGLk3WOi26tOgwTow2SA LQpI+Jgg7U3OJSDL5CboroTraCAT0uG3yUJM1hgmMZHMaSM+K/pbPv2+CBbkF9Yvw/K+9nPYa95HH EFqRyRHbFdGHZpSWC5avWGcVGccD6qAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXSpo-0002Dp-9m for patchwork-linux-mediatek@patchwork.kernel.org; Mon, 25 Jun 2018 14:51:16 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMF56-0007Xm-8R; Fri, 25 May 2018 15:56:42 +0000 Received: from [91.14.64.76] ([91.14.64.76]) by 3c-app-gmx-bs69.server.lan (via HTTP); Fri, 25 May 2018 17:51:23 +0200 MIME-Version: 1.0 Message-ID: From: "Frank Wunderlich" To: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Fw: fix green/blue pio-led on bpi-r2 Date: Fri, 25 May 2018 17:51:23 +0200 Importance: normal Sensitivity: Normal References: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ujMcxgrbcYS8v3JkO7UbYwkqT20JWAJov4Q+k4Q9AHN AIVoDlABgAcXnGAXZOIbL4f6ExEd8JX6hLCBmKUbEnvf0lduxX 7rAd0xV+uzI1bhAcHOjznGhn9SUa0lcuNZrdrNRFFdbuFWJA/U m+1C14pX7sfi1iWwRVtxQ5p1TOo5FY8M7NdXa5BOtkMQr2aT5y BcajfXQ3qnY15B/ToZe6KFkkybymQT5kzN9TD0iYg1bJGNfHwZ bqrBuDa1zAyd2twZqxKjFz4pNkG3iZmhO8POAaTTO30HlRDsY1 +vdNxs= X-UI-Out-Filterresults: notjunk:1; V01:K0:zcPEogesQSk=:9rUfmYHecilUWaAWlVCRCT AEXonYoI9aD5+LtbCzqDDOkRuF+Ks6Vb0MKhja+wRpDb2o6gvDoiM0JThhodrEw4o83QnGlKO 0vTZzNGcfEUELjFcIy3f91ZqJtbze2VZt8jSRVcE/1ka3CAOxHD84U1jQjwHYAmzzymBtTqpE tDcxot9AVwdHXtMxTxzP1X6DJQ2N/tJvWKErz9Z7IQEjK/hyH1/PQO+6r4cknsk2pij5gXH+g vDzpHEDISmF2aJmkgc2arW+fY1NdGJys3xuGsLzc3CoPJNNoHGttHh3etxpkvqifHhUWRIZdu pgNTURF6n11Sw2PkfbJ/5+Gt6oNDX+SWS+KsBCxnrAlOh0wVoEIwK3GUoLAHs/yqJcRm9pSAg nRL8N6seMsHKw8oZ58jbYZgFPxtiT6eTbG1dYlLhDYGJDX+W3gVeRlODJq87386kIvZCj6m0C vnke39IXBRtqNbKZtBFjjzXETSbGCVVtEt4U5a5FEu3cExIvTSJx X-Bad-Reply: References but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180525_085640_610577_EFE1B551 X-CRM114-Status: UNSURE ( 8.13 ) X-CRM114-Notice: Please train this message. X-Mailman-Approved-At: Mon, 25 Jun 2018 07:50:24 -0700 X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Resend to Mailinglist because of previous blocked cause of html-format Gesendet: Freitag, 25. Mai 2018 um 17:47 Uhr Von: "Frank Wunderlich" An: "Matthias Brugger" , "Rob Herring" , "Mark Rutland" , "Russell King" Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Betreff: fix green/blue pio-led on bpi-r2 Hi,   i've tested LEDs on bananapi-r2 and see that they stay on at boot-time and can be switched off by "echo 0", as this behaviour is not logical i changed that. Also green and blue are swapped by access their names in sysfs.   http://forum.banana-pi.org/t/control-on-board-leds/4287/33   hoping everything is alright with the patch (it's my first on here)   to test it:   [16:08] root@bpi-r2:~# L=/sys/class/leds/bpi-r2\:isink [17:41] root@bpi-r2:~# L2=/sys/class/leds/bpi-r2\:pio [17:42] root@bpi-r2:~# echo 1 > $L2:green/brightness [17:42] root@bpi-r2:~# echo 1 > $L2:blue/brightness [17:42] root@bpi-r2:~# echo 0 > $L2:green/brightness [17:42] root@bpi-r2:~# echo 0 > $L2:blue/brightness   at least options needed: CONFIG_SYSFS=y CONFIG_GPIO_SYSFS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_MT6323=y CONFIG_LEDS_GPIO=y   regards Frank   From 850977bdb8cf05b1212c69232f03fd55293fe21a Mon Sep 17 00:00:00 2001 From: Frank Wunderlich Date: Mon, 21 May 2018 21:38:53 +0200 Subject: [PATCH] [DTS] fix green/blue pio-led on bpi-r2 Signed-off-by: Frank Wunderlich ---  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 14 +++++++-------  1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index 024bdb7d6cca5..6fa37a2764110 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -80,21 +80,21 @@          pinctrl-names = "default";          pinctrl-0 = <&led_pins_a>;   -        blue { -            label = "bpi-r2:pio:blue"; -            gpios = <&pio 241 GPIO_ACTIVE_HIGH>; +        green { +            label = "bpi-r2:pio:green"; +            gpios = <&pio 241 GPIO_ACTIVE_LOW>;              default-state = "off";          };   -        green { -            label = "bpi-r2:pio:green"; -            gpios = <&pio 240 GPIO_ACTIVE_HIGH>; +        blue { +            label = "bpi-r2:pio:blue"; +            gpios = <&pio 240 GPIO_ACTIVE_LOW>;              default-state = "off";          };            red {              label = "bpi-r2:pio:red"; -            gpios = <&pio 239 GPIO_ACTIVE_HIGH>; +            gpios = <&pio 239 GPIO_ACTIVE_LOW>;              default-state = "off";          };      };