Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp550782pxk; Sun, 30 Aug 2020 13:45:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyseeHBSNcJiZzNk34YOrL7gUsKBGts2bjo3d+9gJZt9FFougyUDALkDjVII31QwpSZARjt X-Received: by 2002:a17:906:4103:: with SMTP id j3mr191233ejk.5.1598820314571; Sun, 30 Aug 2020 13:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598820314; cv=none; d=google.com; s=arc-20160816; b=W8zt8EYzyJU885RBSuT5WvtY6PFIPDdJ6JKeGu8Fi7K1FhMS8s4bZ5mWReu5ZHFEdq MtAHhQfLSK2bxSNB1IHHHUMhMalInZrh+Wq89mYy/qr01sQKnBvWrv+Hv/clap4SddQ6 Vp0ZP9Mcax+ItJXZ+WYKjqTe4BrRVJTwJW6SlpxJIHCQ9MRVFy6jRN4KFDXoCoYIbAv5 6sRo+FyqKcMjgg7VmRKpial4ITXfCY6tWt/LmopO4yW25vePVAhLQvwUGTYkAiB/o11p 96r5TEj3KHRA9Fd6u0K9fyCXR7Ng9qjSX+nsMDuuqxuqJwtfDyjsYXjS2RV+TACd+0HK EwmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3oQO5gfvbEIAUe++/7t5AJNOvd5ZcYGY+Uv3O48RKMQ=; b=bppiSsri5f9uvL8Kcdd+KLmxI32UuF41906NkLSr/b1heblttVjaj6uGTXPi8B6ezC LmLQa077f0isxOltuKh8WmsPqjkZq0jV2Y3F4DWClmX4DD5q5cZevVHoK/kNud5wKQRA M0j2lNqXaxmqJDje/4pI9pNayALJPk6B0SvJmY6f1riJUf6pnxur7hqLgOpAXkCulEcC uyQksnkzDCgA3jzl9Bryl6VnGRrHbf4SJaCgL82RxIZ2H46Vpegv9ZVtW62uFsKTgVT/ NmBoVXZG9YqC6lrwzzDBKkEfVcsuhuDk1Yz8HAclzBRQzhDavgq/BuH9Ca/uMEkScKXg dbgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si4039910eja.645.2020.08.30.13.44.52; Sun, 30 Aug 2020 13:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726459AbgH3Un4 (ORCPT + 99 others); Sun, 30 Aug 2020 16:43:56 -0400 Received: from gloria.sntech.de ([185.11.138.130]:48408 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgH3Unz (ORCPT ); Sun, 30 Aug 2020 16:43:55 -0400 Received: from p508fca7b.dip0.t-ipconnect.de ([80.143.202.123] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCUB5-0002r0-FD; Sun, 30 Aug 2020 22:43:51 +0200 From: Heiko Stuebner To: Johan Jonker Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] ARM: dts: rockchip: rename and label gpio-led subnodes part 3 Date: Sun, 30 Aug 2020 22:43:50 +0200 Message-ID: <3705366.uVpFMHbKpm@phil> In-Reply-To: <20200813193455.19772-1-jbx6244@gmail.com> References: <20200813193455.19772-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, Am Donnerstag, 13. August 2020, 21:34:54 CEST schrieb Johan Jonker: > 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. I'm undecided about this ... and while thinking about this, realized that we already have some changes doing that in the tree. To explain, in general the pinctrl names should come from the names used in the actual device schematics, as this makes it easier to find and compare them between devicetree and schematics files. So creating an arbitrary foo_led_pin pinctrl instead breaks this searchability which I'd really like to keep. Heiko > > 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>; > }; > }; >