Skip to contentSkip to conversation

dt-bindings: pwm: stmpe: drop legacy binding

PATCH In review Manish Baing 4 participants 4 messages May 8 – May 27

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

PATCH v2 1/1 dt-bindings: pwm: stmpe: drop legacy binding

The st,stmpe-pwm binding is already covered by the MFD schema Documentation/devicetree/bindings/mfd/st,stmpe.yaml. Remove the obsolete and redundant text binding file.

---
Changes in v2:
- Drop the TXT file instead of converting to YAML, as the functionality is already covered by st,stmpe.yaml.
- Update the commit subject and description to reflect the drop.

 .../devicetree/bindings/pwm/st,stmpe-pwm.txt   | 18 ------------------
 1 file changed, 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt
Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt deleted +0 -18
deleted file mode 100644
index f401316e0248..000000000000
@@ -1,18 +0,0 @@
-== ST STMPE PWM controller ==
-
-This is a PWM block embedded in the ST Microelectronics STMPE
-(ST Multi-Purpose Expander) chips. The PWM is registered as a
-subdevices of the STMPE MFD device.
-
-Required properties:
-- compatible: should be:
-  - "st,stmpe-pwm"
-- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Example:
-
-pwm0: pwm {
-	compatible = "st,stmpe-pwm";
-	#pwm-cells = <2>;
-};
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Incomplete Schema Migration / Missing Required Property Constraint --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Incomplete Schema Migration / Missing Required Property Constraint --

commit 652bd7fb646323b7de60d7d1fdac5400a5920f24
Author: Manish Baing <[email protected]>

dt-bindings: pwm: stmpe: drop legacy binding

The commit drops the legacy text binding for st,stmpe-pwm as it is allegedly covered by the mfd schema st,stmpe.yaml.

Quoted 6 lines
Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt deleted +0 -0
deleted file mode 100644
index f401316e0248b..0000000000000
@@ -1,18 +0,0 @@

[ ... ]

Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt line 9

Quoted 3 lines
Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt deleted +0 -3
-Required properties:
-- compatible: should be:
-  - "st,stmpe-pwm"

Does dropping this file remove the only place enforcing the compatible string as a required property?

Looking at Documentation/devicetree/bindings/mfd/st,stmpe.yaml, the pwm subnode defines the compatible property but omits it from a required list, unlike the touchscreen or keyboard-controller subnodes:

pwm:

    type: object
    $ref: /schemas/pwm/pwm.yaml#

    unevaluatedProperties: false

    properties:
      compatible:
        const: st,stmpe-pwm

      "#pwm-cells":
        const: 2

Without this text binding, a device tree node lacking the compatible string will silently pass dt_binding_check schema validation.

It would then fail to probe at runtime because mfd_add_devices() relies on matching the compatible string to map the device tree node to the instantiated child device.

Could the yaml schema be fixed by adding compatible to a required list in the pwm node before or in the same patch series as dropping the text binding?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Acked-by on v2 1/1
#2 lore raw
In reply to Manish Baing
Quoted 11 lines · Manish Baing

The st,stmpe-pwm binding is already covered by the MFD schema Documentation/devicetree/bindings/mfd/st,stmpe.yaml. Remove the obsolete and redundant text binding file.

---
Changes in v2:
- Drop the TXT file instead of converting to YAML, as the functionality is already covered by st,stmpe.yaml.
- Update the commit subject and description to reflect the drop.

Quoted 4 lines
 .../devicetree/bindings/pwm/st,stmpe-pwm.txt   | 18 ------------------
 1 file changed, 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/st,stmpe-pwm.txt