refactor(behaviors): Make label property optional

Changed all code (except for layer names) which used the label property
to use DEVICE_DT_NAME() instead, which uses the label if set or falls
back to the full node name. This matches how Zephyr determines the node
names used with device_get_binding() and allows us to start removing the
deprecated label property from things.
This commit is contained in:
Joel Spadin
2023-09-05 11:35:51 -05:00
parent dbe5dfb1d8
commit 179bdbc41a
15 changed files with 71 additions and 63 deletions

View File

@@ -4,7 +4,8 @@
properties:
label:
type: string
required: true
required: false
deprecated: true
"#binding-cells":
type: int
required: true

View File

@@ -4,7 +4,8 @@
properties:
label:
type: string
required: true
required: false
deprecated: true
"#binding-cells":
type: int
required: true

View File

@@ -4,7 +4,8 @@
properties:
label:
type: string
required: true
required: false
deprecated: true
"#binding-cells":
type: int
required: true

View File

@@ -8,7 +8,8 @@ compatible: "zmk,behavior-sensor-rotate-var"
properties:
label:
type: string
required: true
required: false
deprecated: true
"#sensor-binding-cells":
type: int
required: true

View File

@@ -8,7 +8,8 @@ compatible: "zmk,behavior-sensor-rotate"
properties:
label:
type: string
required: true
required: false
deprecated: true
"#sensor-binding-cells":
type: int
required: true

View File

@@ -6,6 +6,8 @@ compatible: "zmk,kscan-composite"
properties:
label:
type: string
required: false
deprecated: true
rows:
type: int
columns:
@@ -17,6 +19,8 @@ child-binding:
properties:
label:
type: string
required: false
deprecated: true
kscan:
type: phandle
row-offset:

View File

@@ -6,6 +6,8 @@ compatible: "zmk,kscan-mock"
properties:
label:
type: string
required: false
deprecated: true
event-period:
type: int
description: Milliseconds between each generated event