Skip to contentSkip to conversation

dt-bindings: leds: Drop redundant cpus enum match

PATCH Applied Nishanth Menon 4 participants 4 messages Apr 24, 2023 – Apr 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: leds: Drop redundant cpus enum match

Commit e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers") introduced a enum match for cpu, while a pattern '^cpu[0-9]*$' already exists.

This causes linux,default-trigger = "cpu" to have more than one match and generates the following dtbs_check warning:

arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dtb: leds: led-2:linux,default-trigger: More than one condition true in oneOf schema:

	{'$ref': '/schemas/types.yaml#/definitions/string',
	 'oneOf': [{'items': [{'enum': ['backlight',
	                                'default-on',
	                                'heartbeat',
	                                'disk-activity',
	                                'disk-read',
	                                'disk-write',
	                                'timer',
	                                'pattern',
	                                'audio-micmute',
	                                'audio-mute',
	                                'bluetooth-power',
	                                'cpu',
	                                'flash',
	                                'kbd-capslock',
	                                'mtd',
	                                'nand-disk',
	                                'none',
	                                'torch',
	                                'usb-gadget',
	                                'usb-host',
	                                'usbport']}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^cpu[0-9]*$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^hci[0-9]+-power$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^mmc[0-9]+$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^phy[0-9]+tx$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'}]}

Drop the explicit match against cpu since the pattern match already covers the same.

Fixes e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers")
Cc Manivannan Sadhasivam <[email protected]>
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 --
 1 file changed, 2 deletions(-)
Documentation/devicetree/bindings/leds/common.yaml +0 -2
index 11aedf1650a1..58b492d00246 100644
@@ -105,8 +105,6 @@ properties:
           - audio-mute
             # LED indicates bluetooth power state
           - bluetooth-power
-            # LED indicates activity of all CPUs
-          - cpu
             # LED indicates camera flash state
           - flash
             # LED indicated keyboard capslock
Signature · 1 line
2.40.0
Acked-by on v1 1/1
#1 lore raw
Quoted 50 lines · Nishanth Menon

Commit e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers") introduced a enum match for cpu, while a pattern '^cpu[0-9]*$' already exists.

This causes linux,default-trigger = "cpu" to have more than one match and generates the following dtbs_check warning:

arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dtb: leds: led-2:linux,default-trigger: More than one condition true in oneOf schema:

	{'$ref': '/schemas/types.yaml#/definitions/string',
	 'oneOf': [{'items': [{'enum': ['backlight',
	                                'default-on',
	                                'heartbeat',
	                                'disk-activity',
	                                'disk-read',
	                                'disk-write',
	                                'timer',
	                                'pattern',
	                                'audio-micmute',
	                                'audio-mute',
	                                'bluetooth-power',
	                                'cpu',
	                                'flash',
	                                'kbd-capslock',
	                                'mtd',
	                                'nand-disk',
	                                'none',
	                                'torch',
	                                'usb-gadget',
	                                'usb-host',
	                                'usbport']}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^cpu[0-9]*$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^hci[0-9]+-power$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^mmc[0-9]+$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^phy[0-9]+tx$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'}]}
Quoted 6 lines

Drop the explicit match against cpu since the pattern match already covers the same.

Fixes e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers")
Cc Manivannan Sadhasivam <[email protected]>

- Mani

Quoted 20 lines
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 --
 1 file changed, 2 deletions(-)
Documentation/devicetree/bindings/leds/common.yaml +0 -2
index 11aedf1650a1..58b492d00246 100644
@@ -105,8 +105,6 @@ properties:
           - audio-mute
             # LED indicates bluetooth power state
           - bluetooth-power
-            # LED indicates activity of all CPUs
-          - cpu
             # LED indicates camera flash state
           - flash
             # LED indicated keyboard capslock
Signature · 1 line
2.40.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Nishanth Menon
Quoted 53 lines · Nishanth Menon

Commit e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers") introduced a enum match for cpu, while a pattern '^cpu[0-9]*$' already exists.

This causes linux,default-trigger = "cpu" to have more than one match and generates the following dtbs_check warning:

arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dtb: leds: led-2:linux,default-trigger: More than one condition true in oneOf schema:

	{'$ref': '/schemas/types.yaml#/definitions/string',
	 'oneOf': [{'items': [{'enum': ['backlight',
	                                'default-on',
	                                'heartbeat',
	                                'disk-activity',
	                                'disk-read',
	                                'disk-write',
	                                'timer',
	                                'pattern',
	                                'audio-micmute',
	                                'audio-mute',
	                                'bluetooth-power',
	                                'cpu',
	                                'flash',
	                                'kbd-capslock',
	                                'mtd',
	                                'nand-disk',
	                                'none',
	                                'torch',
	                                'usb-gadget',
	                                'usb-host',
	                                'usbport']}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^cpu[0-9]*$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^hci[0-9]+-power$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^mmc[0-9]+$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^phy[0-9]+tx$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'}]}

Drop the explicit match against cpu since the pattern match already covers the same.

Quoted 7 lines
Fixes e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers")
Cc Manivannan Sadhasivam <[email protected]>
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 --
 1 file changed, 2 deletions(-)
maintainer Applied
#3 lore raw
In reply to Nishanth Menon
Quoted 53 lines · Nishanth Menon

Commit e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers") introduced a enum match for cpu, while a pattern '^cpu[0-9]*$' already exists.

This causes linux,default-trigger = "cpu" to have more than one match and generates the following dtbs_check warning:

arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dtb: leds: led-2:linux,default-trigger: More than one condition true in oneOf schema:

	{'$ref': '/schemas/types.yaml#/definitions/string',
	 'oneOf': [{'items': [{'enum': ['backlight',
	                                'default-on',
	                                'heartbeat',
	                                'disk-activity',
	                                'disk-read',
	                                'disk-write',
	                                'timer',
	                                'pattern',
	                                'audio-micmute',
	                                'audio-mute',
	                                'bluetooth-power',
	                                'cpu',
	                                'flash',
	                                'kbd-capslock',
	                                'mtd',
	                                'nand-disk',
	                                'none',
	                                'torch',
	                                'usb-gadget',
	                                'usb-host',
	                                'usbport']}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^cpu[0-9]*$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^hci[0-9]+-power$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^mmc[0-9]+$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'},
	           {'items': [{'pattern': '^phy[0-9]+tx$'}],
	            'maxItems': 1,
	            'minItems': 1,
	            'type': 'array'}]}

Drop the explicit match against cpu since the pattern match already covers the same.

Quoted 6 lines
Fixes e91a4d5deb96 ("dt-bindings: leds: Document commonly used LED triggers")
Cc Manivannan Sadhasivam <[email protected]>
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 --
 1 file changed, 2 deletions(-)

Applied, thanks

Signature · 1 line
Lee Jones [李琼斯]