Message ID | 20221125195401.61642-1-samuel@sholland.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4257732wrr; Fri, 25 Nov 2022 11:58:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OxBKJ8J9+Ul8D+kkSB5HjiL9JsvW0ijtNqTqD64DE1JpdPSYflwJATo2ojnzn7NWJcJxC X-Received: by 2002:a17:90a:2b43:b0:200:40a2:eaaa with SMTP id y3-20020a17090a2b4300b0020040a2eaaamr48024999pjc.68.1669406311388; Fri, 25 Nov 2022 11:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669406311; cv=none; d=google.com; s=arc-20160816; b=mkjRv7MHynA4EhRhTCiqBGhOFKKwh2US2v2jfsj3cuKUmyUyIEdyW7qIh5TMSRfzw/ 8WVGLWtaLq/N5pcjBPcAX0GJzBkYWlVfIjjUFn/YsUj6g8T58Z9lJbDrb64GUFZZwNSE soFq3aF0M7Tp/mXatkuefKpB33ljVLqce9OERH1CkI9joM3gWtHLeQ0jrAa5nQMWbr3O wVEC3OlUB35MchY8iPVq7JTHqce4mmKye/h5cMfl3j4zKKggZc5uWUdNXgWH619YxzSc upiGwkuxc6cND9JEUEh7bcGces5KH5cMQyuN8LkOT21uCZYRl3qHUu8RUmzBTjZF/rt2 QjlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=d9RBks0wci/gqhrse9JNMyVYsNZ48qNxrEdP2snbsqM=; b=yBBuDqRx8ue/TClpoBXBSmNBgusAF8I5EamByayJ+Hp6GKPcwOg387jOhyBLW3v6Xf 6qhrHyd3qjNAV2gYRTutAyLcXxHrpyDyeedcUnuo15uDMdiFD/U6/pHP6v0mD8GfE1rQ pon4n0CwYFNpmpjqiHCqjW3W35iyyy/XmB0Bm3DVsr7nW10vVr2jpnon9eNwySGPA/tk VXFWaiYJYK7iRsgKk/gHYTlAsY57bxf2aSV5Whq4F2fUWYBpLhBQrmfy5XHWXQ9Q3xBs UFGW3vRe4gQkAqzlusUc+fcQnPE1oYUWu7XQql66ypGmArxgdAQfhf7xH8dg9FFPe/Rf PJ3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=Hn+5UCD3; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Vj98wfjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020a056a0008d000b005739d652a89si5070885pfu.223.2022.11.25.11.58.18; Fri, 25 Nov 2022 11:58:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=Hn+5UCD3; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Vj98wfjk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbiKYTyI (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Fri, 25 Nov 2022 14:54:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbiKYTyG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 25 Nov 2022 14:54:06 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B757845A03; Fri, 25 Nov 2022 11:54:05 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7815E5C00FE; Fri, 25 Nov 2022 14:54:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 25 Nov 2022 14:54:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1669406043; x=1669492443; bh=d9RBks0wci/gqhrse9JNMyVYs NZ48qNxrEdP2snbsqM=; b=Hn+5UCD3sX3nLig53Boj7q7be0IKtRb81i+HdWPjf rLirhsk8s1UqYth+7Da7AZzZCJc8S7fk7JcBl/khD+I87cBwDBhIPdyWHIwwH2lD xg5JhL6VSJ36PscblL+BsjFZSm40sg6+5c4hzO+3LVvK7z3kBENgDeE9a/6n7VEN hMvj45st4Ih2+3/KzlfynueHuxy+rY9bWdFpL7jaBctu9kPRkhfNKvZSnnmbpdDF xy7/UWi8WH6BDVzKOhs2+mALJFaqn/Ah1+JnOJI9ynM1anIElxIeCCmTGitbpJS8 TKWgQ714D7Z9uC4MaCG8p4ouU2j2TD6pQV4QcVU0Uvpmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1669406043; x=1669492443; bh=d9RBks0wci/gqhrse9JNMyVYsNZ48qNxrEd P2snbsqM=; b=Vj98wfjkod8dwgVMVhCA8jN2QVFEy/vfeIIThmghKYE4jXpapAH JpF8kK1H/AXQIBbgAsselSvMXM4NE7cYtUTpPmpGqTybgpks4+1jFbmJnRSg4dDv 8uzGs+dLky+3KG6Ng2gWGpYz6MwW4jgFAcB5zFASzUjI7OxdIOu76MApxBVlcB84 bcLwtM5HH9hUu+nuX2DUe7mc8/Zf06taQDFjl2IprAZXV46kFF3JusuWQiCJ1xbR bDlTsypFynPqzKQeK9zWMJ9WgNQW9ZHbKS9FH8pQPMfYFl2sGZ2cd3pSfsLvT6R2 EUsjm/r0i6tATHZPOsmAzen/+lWJ4Tyn6tg== X-ME-Sender: <xms:Wh2BY4HMdcSKcD34xwQXAfOZbAheeppI-CqlyW4tSm0rGrcjLY70_g> <xme:Wh2BYxUVxihc5u7m8Xb3_-7OoqyVxQJuppHtUW54DgkkluCh519zGnVSEpgOVmWDX 6y8_QLhS45RRIkiww> X-ME-Received: <xmr:Wh2BYyIwBPCdsW9mPBeekA9kRX7U8CHBixGAz7Y00nHDpBZdbCVHGQVrW-rdM6fm9Pg6kwYT8zm_XrPHj20730J2VxzchDAfRUeJL2zB3_vYwMZ06JRDionnzqI_aHHzConyhQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieehgddufeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeevlefhjeeuleeltedvjedvfeefteegleehueejffehgffffeekhefh hfekkeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: <xmx:Wh2BY6F2QhVgsjGSdQpxRTdxSIQ8H-3Kj2tl7EkGG1_WOylAIKdYyQ> <xmx:Wh2BY-XskPoejYMY5PyzPGBtZONKEeIIICy7Msr4vx_hKtV_GRBjxA> <xmx:Wh2BY9M3jV7GIExvL59HCS3UV72M7lgZMyOTQKbdkCB3SOfMyaO3XA> <xmx:Wx2BY5EOY0ajl5laR7lNDeEpgPE5_GjxDqBOkpVmZfwYtX8OO2CIEA> Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Nov 2022 14:54:02 -0500 (EST) From: Samuel Holland <samuel@sholland.org> To: Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com> Cc: Samuel Holland <samuel@sholland.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names Date: Fri, 25 Nov 2022 13:54:00 -0600 Message-Id: <20221125195401.61642-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750499392273528776?= X-GMAIL-MSGID: =?utf-8?q?1750499392273528776?= |
Series |
[1/2] ARM: dts: sunxi: Fix GPIO LED node names
|
|
Commit Message
Samuel Holland
Nov. 25, 2022, 7:54 p.m. UTC
These board devicetrees fail to validate because the gpio-leds schema
requires its child nodes to have "led" in the node name.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +-
arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Fri, 25 Nov 2022 13:54:00 -0600 Samuel Holland <samuel@sholland.org> wrote: Hi Samuel, > These board devicetrees fail to validate because the gpio-leds schema > requires its child nodes to have "led" in the node name. > > Signed-off-by: Samuel Holland <samuel@sholland.org> That looks alright, though the comment in the binding says that we should just have led-0, led-1 instead, so just (hex) numbers. The "status" name is also in the label, so we wouldn't lose information. Actually, also "label" is deprecated, in favour of "color" and "function", shall this be fixed on the way? Or is there anything that breaks (older kernels) when removing the label property? Cheers, Andre > --- > > arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +- > arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +- > arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > index a32cde3e32eb..3222f1490716 100644 > --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > @@ -70,7 +70,7 @@ chosen { > leds { > compatible = "gpio-leds"; > > - status { > + led-status { > label = "chip-pro:white:status"; > gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; > default-state = "on"; > diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts > index 4bf4943d4eb7..303191c926c2 100644 > --- a/arch/arm/boot/dts/sun5i-r8-chip.dts > +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts > @@ -70,7 +70,7 @@ chosen { > leds { > compatible = "gpio-leds"; > > - status { > + led-status { > label = "chip:white:status"; > gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; > default-state = "on"; > diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > index 0af48e143b66..b84822453381 100644 > --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > @@ -67,7 +67,7 @@ hdmi_con_in: endpoint { > leds { > compatible = "gpio-leds"; > > - status { > + led-status { > label = "sina31s:status:usr"; > gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ > };
Hi Andre, On 11/25/22 15:40, Andre Przywara wrote: > On Fri, 25 Nov 2022 13:54:00 -0600 > Samuel Holland <samuel@sholland.org> wrote: > > Hi Samuel, > >> These board devicetrees fail to validate because the gpio-leds schema >> requires its child nodes to have "led" in the node name. >> >> Signed-off-by: Samuel Holland <samuel@sholland.org> > > That looks alright, though the comment in the binding says that we > should just have led-0, led-1 instead, so just (hex) numbers. The > "status" name is also in the label, so we wouldn't lose information. I am not a fan of giving the LEDs meaningless enumerators, but I can do that if the maintainers insist. > Actually, also "label" is deprecated, in favour of "color" and > "function", shall this be fixed on the way? Or is there anything that > breaks (older kernels) when removing the label property? The label is exposed to userspace as the path in sysfs, so we cannot change it. There is no way to construct that exact label using function and color -- see led_compose_name(). Regards, Samuel >> --- >> >> arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +- >> arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +- >> arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +- >> 3 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts >> index a32cde3e32eb..3222f1490716 100644 >> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts >> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts >> @@ -70,7 +70,7 @@ chosen { >> leds { >> compatible = "gpio-leds"; >> >> - status { >> + led-status { >> label = "chip-pro:white:status"; >> gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; >> default-state = "on"; >> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts >> index 4bf4943d4eb7..303191c926c2 100644 >> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts >> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts >> @@ -70,7 +70,7 @@ chosen { >> leds { >> compatible = "gpio-leds"; >> >> - status { >> + led-status { >> label = "chip:white:status"; >> gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; >> default-state = "on"; >> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts >> index 0af48e143b66..b84822453381 100644 >> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts >> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts >> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint { >> leds { >> compatible = "gpio-leds"; >> >> - status { >> + led-status { >> label = "sina31s:status:usr"; >> gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ >> }; >
Hi Samuel, Dne petek, 25. november 2022 ob 22:50:07 CET je Samuel Holland napisal(a): > Hi Andre, > > On 11/25/22 15:40, Andre Przywara wrote: > > On Fri, 25 Nov 2022 13:54:00 -0600 > > Samuel Holland <samuel@sholland.org> wrote: > > > > Hi Samuel, > > > >> These board devicetrees fail to validate because the gpio-leds schema > >> requires its child nodes to have "led" in the node name. > >> > >> Signed-off-by: Samuel Holland <samuel@sholland.org> > > > > That looks alright, though the comment in the binding says that we > > should just have led-0, led-1 instead, so just (hex) numbers. The > > "status" name is also in the label, so we wouldn't lose information. > > I am not a fan of giving the LEDs meaningless enumerators, but I can do > that if the maintainers insist. I'm not a fan of that either, but binding really wants enumerator. So let's conform to that. Best regards, Jernej > > > Actually, also "label" is deprecated, in favour of "color" and > > "function", shall this be fixed on the way? Or is there anything that > > breaks (older kernels) when removing the label property? > > The label is exposed to userspace as the path in sysfs, so we cannot > change it. There is no way to construct that exact label using function > and color -- see led_compose_name(). > > Regards, > Samuel > > >> --- > >> > >> arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +- > >> arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +- > >> arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +- > >> 3 files changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > >> b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts index > >> a32cde3e32eb..3222f1490716 100644 > >> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > >> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts > >> @@ -70,7 +70,7 @@ chosen { > >> > >> leds { > >> > >> compatible = "gpio-leds"; > >> > >> - status { > >> + led-status { > >> > >> label = "chip-pro:white:status"; > >> gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; > >> default-state = "on"; > >> > >> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts > >> b/arch/arm/boot/dts/sun5i-r8-chip.dts index 4bf4943d4eb7..303191c926c2 > >> 100644 > >> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts > >> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts > >> @@ -70,7 +70,7 @@ chosen { > >> > >> leds { > >> > >> compatible = "gpio-leds"; > >> > >> - status { > >> + led-status { > >> > >> label = "chip:white:status"; > >> gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; > >> default-state = "on"; > >> > >> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > >> b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts index > >> 0af48e143b66..b84822453381 100644 > >> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > >> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts > >> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint { > >> > >> leds { > >> > >> compatible = "gpio-leds"; > >> > >> - status { > >> + led-status { > >> > >> label = "sina31s:status:usr"; > >> gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ > >> > >> };
diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts index a32cde3e32eb..3222f1490716 100644 --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts @@ -70,7 +70,7 @@ chosen { leds { compatible = "gpio-leds"; - status { + led-status { label = "chip-pro:white:status"; gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; default-state = "on"; diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts index 4bf4943d4eb7..303191c926c2 100644 --- a/arch/arm/boot/dts/sun5i-r8-chip.dts +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts @@ -70,7 +70,7 @@ chosen { leds { compatible = "gpio-leds"; - status { + led-status { label = "chip:white:status"; gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; default-state = "on"; diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts index 0af48e143b66..b84822453381 100644 --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts @@ -67,7 +67,7 @@ hdmi_con_in: endpoint { leds { compatible = "gpio-leds"; - status { + led-status { label = "sina31s:status:usr"; gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ };