diff options
author | Johan Jonker <jbx6244@gmail.com> | 2020-04-28 17:49:33 +0300 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2020-05-19 01:15:56 +0300 |
commit | e916d85b922fed7be861f63e388214bba6f20719 (patch) | |
tree | 9154bac4937947506a9a0969d6f78f5999d5ee15 /arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | |
parent | 84836ded76ec9a6f25d1d0acebaad44977e0ec6f (diff) | |
download | linux-e916d85b922fed7be861f63e388214bba6f20719.tar.xz |
arm64: dts: rockchip: rename and label gpio-led subnodes
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. A test with the command
below gives a screen full of warnings like:
arch/arm64/boot/dts/rockchip/rk3368-r88.dt.yaml: gpio-leds:
'work' does not match any of the regexes:
'(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'
Fix these errors 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 <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200428144933.10953-2-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts')
-rw-r--r-- | arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts index b20062890024..a44c8374dc3c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -90,9 +90,9 @@ leds { compatible = "gpio-leds"; pinctrl-names = "default"; - pinctrl-0 = <&pwrled_gpio &slpled_gpio>; + pinctrl-0 = <&pwr_led_pin &slp_led_pin>; - green-led { + green_led: led-0 { color = <LED_COLOR_ID_GREEN>; default-state = "on"; function = LED_FUNCTION_POWER; @@ -100,7 +100,7 @@ label = "green:power"; }; - red-led { + red_led: led-1 { color = <LED_COLOR_ID_RED>; default-state = "off"; function = LED_FUNCTION_STANDBY; @@ -824,11 +824,11 @@ }; leds { - pwrled_gpio: pwrled_gpio { + pwr_led_pin: pwr-led-pin { rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; }; - slpled_gpio: slpled_gpio { + slp_led_pin: slp-led-pin { rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; |