From patchwork Thu Aug 13 19:34:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 11712895 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E596A722 for ; Thu, 13 Aug 2020 19:35:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE8DB20791 for ; Thu, 13 Aug 2020 19:35:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xTgyO0Cy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tBBT5t5o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE8DB20791 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WKj2GclqNjEpohoyv8+ooDjh0pBV67uEC+RBK+l2NwU=; b=xTgyO0CyZ9GE7xZl87q7tcKe/G TEbBJTcmPMpTxX+MQqiTyJB27JO8FwwcMJVTyFZNzEkUTD0qAKV0lkY/kbss6x3Zd+RLP6syA9PYB kVW4RMAEQeeH4fS0Eg4WkdS7CbtGJVXdfxijec23X0bOz/PJssvRlLynyVKLBiV8QU/5Yn6cTIt78 tWIgrskSwVqakUbYFbzhwnxgJmUMVsNRa/P6GAQzYctZIsG75LlWo98robauhRmT01+sxdh49pmJB 8Qw40b8h1sllb7cxXJFPQX7HB1fAUY+fpg1yH49z0q2xzVSEOvWWoN34Ha/G8e5vQTfNoYXltPFT1 AYQQal4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6J0K-0006gn-Ph; Thu, 13 Aug 2020 19:35:12 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6J0D-0006f5-0y; Thu, 13 Aug 2020 19:35:07 +0000 Received: by mail-ej1-x642.google.com with SMTP id g19so7408038ejc.9; Thu, 13 Aug 2020 12:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=12087FTp/9siWmAQYdka9CL+BX7dl2z7W64nVKUq+mY=; b=tBBT5t5o2REJgDO4g+TrwhTLSetN55ivpIQFldh6ISQntwzdiBKYqnJxQH5O9o4+CR DHui/QjNFZbzkEZQMxIvtUp+mrz3nMQCrLHivjoFbxWpf6W+OqMwXS17teRDeRA6u5kT 4e0RgfFQiCS1tuB7wXdr3iK9YKx7sT0jsODiIzf0GtKyemv+f7XpDkyxYQG9rN6/+7lS egVZtnjLpyT0lvDRpHQVB6ONg7Ydnybksd21728Cw+WlQDTUHIKi4kAZhFp6Tlf6AdKH E3cF0aDwhHoXp7FaDSnIf19s9m7aYOMnYJN6gBi+t4gjyfmvoIz6/6uT1azYh8XyQq0C W64Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=12087FTp/9siWmAQYdka9CL+BX7dl2z7W64nVKUq+mY=; b=i4QdWbfSsMxtru3Z5GKIp4kk78+V4F1W9eNdlyP+IjpHGPaXce6yiVsDlqidO6h8RC 6zECunBwi8LRLpbq/VMYXqZG20ZT8cyEgtXQBQuj7ZTbVAHQWjUs87YBfzvGrWijk99X vLfBz4XCb09s4I2zT/qo+ICOs7nSOouPaQV8kNJzFLK33fSrRsB+Jly55pPbdAsez9aN YpgJCAjF4Dc457+297PaMpTHSUKIdtpRg1Tcgg06u23iG21xCkd039Lw5lJUHnnWW+FB ayjnwJREzfmz1lieTtYjTF1D4uIfF0i2b60NWFpgx54C+3YIOC8DkaqxuoNNs+dxa7AB yF/A== X-Gm-Message-State: AOAM531Gfw50RnQ2IJJNzjglUfjgekDyLuRlP0Cj7fUrIJGXWW5SvqlY FOrbJlU7NWRQ7GqBUd0Jdkk= X-Google-Smtp-Source: ABdhPJzxzJWAiaIXjEwIoz/ywgVFx1eH/wgrFrgxLMsQw0GYqiJify07ZgB3889gG5pzyXz6wyQ0/w== X-Received: by 2002:a17:906:1a54:: with SMTP id j20mr6601465ejf.102.1597347302920; Thu, 13 Aug 2020 12:35:02 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id d9sm4120603edt.20.2020.08.13.12.35.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2020 12:35:02 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Subject: [PATCH v1 1/2] ARM: dts: rockchip: rename and label gpio-led subnodes part 3 Date: Thu, 13 Aug 2020 21:34:54 +0200 Message-Id: <20200813193455.19772-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200813_153505_196221_C10543DF X-CRM114-Status: GOOD ( 13.70 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [jbx6244[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jbx6244[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Current dts files with 'gpio-led' nodes were manually verified. In order to automate this process leds-gpio.txt has been converted to yaml. With this conversion a check for pattern properties was added. In part 3 rename and label gpio-led subnodes with pinctrl. To make things equal to other dts files move pinctrl below the compatible property. Fix with help of the following rules: 1: Add nodename in the preferred form. 2: Always add a label that ends with '_led' to prevent conflicts with other labels such as 'power' and 'mmc' 3: If leds need pinctrl add a label that ends with '_led_pin' also to prevent conflicts with other labels. patternProperties: # The first form is preferred, but fall back to just 'led' # anywhere in the node name to at least catch some child nodes. "(^led-[0-9a-f]$|led)": make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/ leds-gpio.yaml Signed-off-by: Johan Jonker --- arch/arm/boot/dts/rk3036-kylin.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts index 7154b827e..bf808cda6 100644 --- a/arch/arm/boot/dts/rk3036-kylin.dts +++ b/arch/arm/boot/dts/rk3036-kylin.dts @@ -15,12 +15,12 @@ leds: gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&work_led_pin>; work_led: led-0 { gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; label = "kylin:red:led"; - pinctrl-names = "default"; - pinctrl-0 = <&led_ctl>; }; }; @@ -367,7 +367,7 @@ &pinctrl { leds { - led_ctl: led-ctl { + work_led_pin: work-led-pin { rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; From patchwork Thu Aug 13 19:34:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 11712893 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1488722 for ; Thu, 13 Aug 2020 19:35:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C4B120791 for ; Thu, 13 Aug 2020 19:35:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JZMC35iT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jKwXyBMT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C4B120791 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=41DeqY7GYWyDq5x01DbUHtrm/xB4v21CxR1+vrWcD5o=; b=JZMC35iTAIEAX0jXNRyjPH/jmA XNRI0VhBfEWFwbB4RfF28PpVb3iFLUBTk0wp0Z/4HBnTRB96EWg/X7gQ8MkZgqI48gbmgFAZo0BiV u11aGzGWDfJ50rSsqFGNNg6Jc+3YVCwq5cy0HuENh3BqlsHAmcozBjRlAQbbdCKL0Hl3UtGQw8gK5 7mYTT/g4tIdpv7bm7z2p65CJWfMLk8nTquZAJW6wz19CTvUKWoQroIx43/0kaJ86Bd87vdRsL4GTV XHFIxQOzejdMrmdga/PjAUR37teqa0aat+nDwLwGZ5TPW5uJ4ivkPAWEB7yXfAG+DvOesv9qPMkwU 23+2VvyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6J0L-0006gw-6A; Thu, 13 Aug 2020 19:35:13 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6J0D-0006f6-4H; Thu, 13 Aug 2020 19:35:07 +0000 Received: by mail-ed1-x541.google.com with SMTP id cq28so5063833edb.10; Thu, 13 Aug 2020 12:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WcafXLrIkW0gekBmKMIz/WZuLgKVGf9oTkGw44iFQAY=; b=jKwXyBMTVbZIwxzdDbn4XzuY5kWxoEjoYdq44qxpBinPI8Lu1BRbXnTJnVD8BChmT0 /mYN/YwSOnd2eqZHkP7346RrvyWV3wxi4xUGFyRBdyQL6yn3yISjxVyrdTOmVv7JKhhL fZWnuRfbC9Hke/lnF5RnztabNgLVm58WA491/2fh3FGHhsspy/f2HaoZAIEqgkzg5Zqp p6EZk8zekcbsd7ftzRQO4HxyyEo9190CNX27eRNeUYZoij3Gw2fIcAytWP9asfAOFOhu 4zu5kC7Psrt7JOIxeZbE4nbeXavSjoLmybZ71aKZVkQQE/E0kRV81HQSjQ+xj5dDLMAe yx5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WcafXLrIkW0gekBmKMIz/WZuLgKVGf9oTkGw44iFQAY=; b=NbK2vikkm3GjMyGJSQEfeLWlb9UhP2iRsxGTDo0vDU788XSwZNrP3nnXxJPgN6I4pe ATY82dxGOK9qM+zUflBgA00bJkj8WMOJpyLEtqCjutpNSdNjaiAO8UJEVQXhxplgxXex vIWbZtTrjm/YmJ2fLhRsLFywHKxc88cXoDqy3hJN6tzk7abw2l9sOZ36ip1UryTnpI8V 6EYkey8v/t5Y4oi4aASnAluaZPduQ6oi1hEFiZeu202RhjbfLnKgVl4bHNW1IXI5XQ9H msa4tPbkAOiERW6lB/QqB0usMICtsQ9r/0vlx1KrOhasoti9xmePMYFSXOVoHMY1mtyg 30/Q== X-Gm-Message-State: AOAM5321N8j7I4sWYLePB7cjhZrnu5/ZG0M58dWK+S/pHXjDMfjaJuw9 oCMH/T7+zlrJu8mSGc5DtXA= X-Google-Smtp-Source: ABdhPJwOrP1UE4L64efXQ7WL1gPe1+nNlyRA7pxgg+eGvVs0QbKOxTAEzQ6DYpByvhQ64IcvTIk/eg== X-Received: by 2002:aa7:c74f:: with SMTP id c15mr1045294eds.331.1597347303796; Thu, 13 Aug 2020 12:35:03 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id d9sm4120603edt.20.2020.08.13.12.35.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2020 12:35:03 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Subject: [PATCH v1 2/2] arm64: dts: rockchip: rename and label gpio-led subnodes part 3 Date: Thu, 13 Aug 2020 21:34:55 +0200 Message-Id: <20200813193455.19772-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200813193455.19772-1-jbx6244@gmail.com> References: <20200813193455.19772-1-jbx6244@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200813_153505_201303_9A18D253 X-CRM114-Status: GOOD ( 14.98 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:541 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [jbx6244[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jbx6244[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Current dts files with 'gpio-led' nodes were manually verified. In order to automate this process leds-gpio.txt has been converted to yaml. With this conversion a check for pattern properties was added. In part 3 rename and label gpio-led subnodes with pinctrl. To make things equal to other dts files move pinctrl below the compatible property. Fix with help of the following rules: 1: Add nodename in the preferred form. 2: Always add a label that ends with '_led' to prevent conflicts with other labels such as 'power' and 'mmc' 3: If leds need pinctrl add a label that ends with '_led_pin' also to prevent conflicts with other labels. patternProperties: # The first form is preferred, but fall back to just 'led' # anywhere in the node name to at least catch some child nodes. "(^led-[0-9a-f]$|led)": make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/ leds-gpio.yaml Signed-off-by: Johan Jonker --- arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 10 ++++------ arch/arm64/boot/dts/rockchip/rk3368-r88.dts | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts index b058ce999..dd6be31f1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts +++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts @@ -49,20 +49,18 @@ leds: gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&red_led_pin>, <&blue_led_pin>; red_led: led-0 { gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; label = "orion:red:led"; - pinctrl-names = "default"; - pinctrl-0 = <&led_ctl>; default-state = "on"; }; blue_led: led-1 { gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; label = "orion:blue:led"; - pinctrl-names = "default"; - pinctrl-0 = <&stby_pwren>; default-state = "off"; }; }; @@ -256,11 +254,11 @@ }; leds { - stby_pwren: stby-pwren { + blue_led_pin: blue-led-pin { rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; }; - led_ctl: led-ctl { + red_led_pin: red-led-pin { rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts index 236ab0f1b..e29c8d172 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts +++ b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts @@ -42,12 +42,12 @@ leds: gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&work_led_pin>; work_led: led-0 { gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; label = "r88:green:led"; - pinctrl-names = "default"; - pinctrl-0 = <&led_ctl>; }; }; @@ -275,7 +275,7 @@ rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; }; - led_ctl: led-ctl { + work_led_pin: work-led-pin { rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; }; };