From mboxrd@z Thu Jan 1 00:00:00 1970 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 AEE5BEE57DF for ; Mon, 11 Sep 2023 14:55:01 +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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Mkj75wiX+f1Ky7yneJ/ONl2EaWKYQ4jjjV6cl1D+z2c=; b=bVZFV5xOKzPzxi Ky4PyssEiHVjOn/xhZHa+FBypVKa1qdFkU+m6xFl7ZDCLpA4S6QLyhnCj6xeNiyBE2U/A+ykmff4m 1tngA/QlEb/dH6DO6SzJJUCzNzIHigm6PVWfRgTE3XPrvO10MEMYjo125wFegSsZAHqV4raI1UdiW eWugC5rWiUVficGwpeBt75MXI5AImTfpWOWTBST6kVNcacCB8z0a4JjZHeNE+nBT2w7W2QgQr8juR OvfqXHhNLM5gwCRXN/dmi6q19bWqgPg5gu7leNJ/fVXqizkuOpht4c084ddPzwMWhVQba3WE7Atr4 wOebR4yHRu//OJaj4AkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfiJ7-000m71-1u; Mon, 11 Sep 2023 14:54:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfiJ3-000m5b-0b for linux-arm-kernel@lists.infradead.org; Mon, 11 Sep 2023 14:54:31 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AA080D75; Mon, 11 Sep 2023 07:54:58 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3DF563F5A1; Mon, 11 Sep 2023 07:54:20 -0700 (PDT) Date: Mon, 11 Sep 2023 15:54:18 +0100 From: Andre Przywara To: longqi Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support), linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC support), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH] fixes the pin settings of two LEDs on board nanopi neo plus2 Message-ID: <20230911155418.330e2334@donnerap.manchester.arm.com> In-Reply-To: <20230911140959.2046340-1-longqi90@gmail.com> References: <20230911140959.2046340-1-longqi90@gmail.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230911_075429_346745_EEFF2623 X-CRM114-Status: GOOD ( 17.89 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 11 Sep 2023 22:09:59 +0800 longqi wrote: Hi, please add a few lines here saying why you fix this: it looks like the red LED wasn't working at all, because of the wrong GPIO, and the colours were actually swapped? This would be good to know for everyone reading this patch. In general this is a good catch, so thanks for sending this! More below: > Signed-off-by: longqi > --- > .../boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > index 4c3921ac236c..0cb7a07ab1de 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts > @@ -26,14 +26,15 @@ leds { > compatible = "gpio-leds"; > > led-0 { > - label = "nanopi:green:pwr"; > - gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; > - default-state = "on"; > + label = "nanopi:red:pwr"; label is now a deprecated property. That's fine for existing DTs, but I guess touching this node means you should update this, by using "function" and "color", as described in: Documentation/devicetree/bindings/leds/common.yaml > + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ > + linux,default-trigger = "default-on"; > }; > > led-1 { > - label = "nanopi:red:status"; > - gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; > + label = "nanopi:green:status"; Same thing with label here, please use "function" and "color". > + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ > + linux,default-trigger = "heartbeat"; I don't think we assign default triggers for LED merely labelled "status", as people might have different use cases for this. For instance I'd find a USB or eMMC trigger more useful. So you can just drop that line. Cheers, Andre _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel