mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
arm64: dts: rockchip: rename and label gpio-led subnodes part 2
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 2 rename and label gpio-led subnodes that passed the regex, but still don't have the preferred form. Any pin subnode that ends with '-gpio' in the pinctrl node generates a warning. 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 make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/ schemas/gpio/gpio.yaml Signed-off-by: Johan Jonker <jbx6244@gmail.com> Link: https://lore.kernel.org/r/20200522154657.9472-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
parent
2bc65fef4f
commit
6dd5e12c0b
@ -25,9 +25,9 @@ eeprom: eeprom@50 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
pinctrl-0 = <&led_pins_module>, <&led_sd_haikou>;
|
pinctrl-0 = <&module_led_pins>, <&sd_card_led_pin>;
|
||||||
|
|
||||||
sd-card-led {
|
sd_card_led: led-3 {
|
||||||
label = "sd_card_led";
|
label = "sd_card_led";
|
||||||
gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||||
linux,default-trigger = "mmc0";
|
linux,default-trigger = "mmc0";
|
||||||
@ -118,7 +118,7 @@ haikou_pin_hog: haikou-pin-hog {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
led_sd_haikou: led-sd-gpio {
|
sd_card_led_pin: sd-card-led-pin {
|
||||||
rockchip,pins =
|
rockchip,pins =
|
||||||
<0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
<0 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
@ -76,16 +76,16 @@ i2c@1 {
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&led_pins_module>;
|
pinctrl-0 = <&module_led_pins>;
|
||||||
|
|
||||||
module_led1 {
|
module_led1: led-1 {
|
||||||
label = "module_led1";
|
label = "module_led1";
|
||||||
gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||||
linux,default-trigger = "heartbeat";
|
linux,default-trigger = "heartbeat";
|
||||||
panic-indicator;
|
panic-indicator;
|
||||||
};
|
};
|
||||||
|
|
||||||
module_led2 {
|
module_led2: led-2 {
|
||||||
label = "module_led2";
|
label = "module_led2";
|
||||||
gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
default-state = "off";
|
||||||
@ -270,7 +270,7 @@ &i2c2 {
|
|||||||
|
|
||||||
&pinctrl {
|
&pinctrl {
|
||||||
leds {
|
leds {
|
||||||
led_pins_module: led-module-gpio {
|
module_led_pins: module-led-pins {
|
||||||
rockchip,pins =
|
rockchip,pins =
|
||||||
<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
|
<2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||||
<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
@ -141,15 +141,15 @@ power {
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&sys_led_gpio>, <&user_led_gpio>;
|
pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
|
||||||
|
|
||||||
sys-led {
|
sys_led: led-0 {
|
||||||
label = "sys_led";
|
label = "sys_led";
|
||||||
linux,default-trigger = "heartbeat";
|
linux,default-trigger = "heartbeat";
|
||||||
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
user-led {
|
user_led: led-1 {
|
||||||
label = "user_led";
|
label = "user_led";
|
||||||
default-state = "off";
|
default-state = "off";
|
||||||
gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
|
||||||
@ -586,11 +586,11 @@ pwrbtn: pwrbtn {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
sys_led_gpio: sys_led-gpio {
|
sys_led_pin: sys-led-pin {
|
||||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
|
||||||
user_led_gpio: user_led-gpio {
|
user_led_pin: user-led-pin {
|
||||||
rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -117,9 +117,9 @@ power {
|
|||||||
leds: gpio-leds {
|
leds: gpio-leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&leds_gpio>;
|
pinctrl-0 = <&status_led_pin>;
|
||||||
|
|
||||||
status {
|
status_led: led-0 {
|
||||||
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||||
label = "status_led";
|
label = "status_led";
|
||||||
linux,default-trigger = "heartbeat";
|
linux,default-trigger = "heartbeat";
|
||||||
@ -520,7 +520,7 @@ fusb0_int: fusb0-int {
|
|||||||
};
|
};
|
||||||
|
|
||||||
gpio-leds {
|
gpio-leds {
|
||||||
leds_gpio: leds-gpio {
|
status_led_pin: status-led-pin {
|
||||||
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -15,9 +15,9 @@ chosen {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
pinctrl-0 = <&led_pin_module>, <&led_sd_haikou>;
|
pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
|
||||||
|
|
||||||
sd-card-led {
|
sd_card_led: led-1 {
|
||||||
label = "sd_card_led";
|
label = "sd_card_led";
|
||||||
gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||||
linux,default-trigger = "mmc0";
|
linux,default-trigger = "mmc0";
|
||||||
@ -179,7 +179,7 @@ haikou_pin_hog: haikou-pin-hog {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
led_sd_haikou: led-sd-gpio {
|
sd_card_led_pin: sd-card-led-pin {
|
||||||
rockchip,pins =
|
rockchip,pins =
|
||||||
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
@ -11,9 +11,9 @@ / {
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&led_pin_module>;
|
pinctrl-0 = <&module_led_pin>;
|
||||||
|
|
||||||
module-led {
|
module_led: led-0 {
|
||||||
label = "module_led";
|
label = "module_led";
|
||||||
gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||||
linux,default-trigger = "heartbeat";
|
linux,default-trigger = "heartbeat";
|
||||||
@ -450,7 +450,7 @@ i2c8_xfer_a: i2c8-xfer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
led_pin_module: led-module-gpio {
|
module_led_pin: module-led-pin {
|
||||||
rockchip,pins =
|
rockchip,pins =
|
||||||
<2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
|
<2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
@ -61,23 +61,23 @@ power {
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>, <&yellow_led_gpio>;
|
pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
|
||||||
|
|
||||||
work-led {
|
work_led: led-0 {
|
||||||
label = "green:work";
|
label = "green:work";
|
||||||
gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "on";
|
default-state = "on";
|
||||||
linux,default-trigger = "heartbeat";
|
linux,default-trigger = "heartbeat";
|
||||||
};
|
};
|
||||||
|
|
||||||
diy-led {
|
diy_led: led-1 {
|
||||||
label = "red:diy";
|
label = "red:diy";
|
||||||
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
default-state = "off";
|
||||||
linux,default-trigger = "mmc1";
|
linux,default-trigger = "mmc1";
|
||||||
};
|
};
|
||||||
|
|
||||||
yellow-led {
|
yellow_led: led-2 {
|
||||||
label = "yellow:yellow-led";
|
label = "yellow:yellow-led";
|
||||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
default-state = "off";
|
||||||
@ -595,15 +595,15 @@ lcd_panel_reset: lcd-panel-reset {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
diy_led_gpio: diy_led-gpio {
|
diy_led_pin: diy-led-pin {
|
||||||
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
|
||||||
work_led_gpio: work_led-gpio {
|
work_led_pin: work-led-pin {
|
||||||
rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
|
||||||
yellow_led_gpio: yellow_led-gpio {
|
yellow_led_pin: yellow-led-pin {
|
||||||
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -39,15 +39,15 @@ power {
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
|
pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
|
||||||
|
|
||||||
work-led {
|
work_led: led-0 {
|
||||||
label = "work";
|
label = "work";
|
||||||
default-state = "on";
|
default-state = "on";
|
||||||
gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
diy-led {
|
diy_led: led-1 {
|
||||||
label = "diy";
|
label = "diy";
|
||||||
default-state = "off";
|
default-state = "off";
|
||||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||||
@ -588,11 +588,11 @@ fusb0_int: fusb0-int {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
work_led_gpio: work_led-gpio {
|
work_led_pin: work-led-pin {
|
||||||
rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
|
|
||||||
diy_led_gpio: diy_led-gpio {
|
diy_led_pin: diy-led-pin {
|
||||||
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user