Re: [PATCH] dt-bindings: mfd: Convert TI TWL6040 to DT schema
Eduard Bostina <[email protected]>
| Newsgroups | dev.linux.lists.mfd,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <CAEFOc61s9761y+7zcuWmNUeRuOWika=uhAhOay8ufL7vVhNk8w@mail.gmail.com> |
On Sat, Aug 15, 2026 at 11:46 AM <[email protected]> wrote: > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The YAML schema defines incorrect property names for the vibra default voltages, mismatching the driver's requirements and breaking schema validation. > -- > > --- Patch [1]: [PATCH] dt-bindings: mfd: Convert TI TWL6040 to DT schema --- > commit c57af8c690b680b78b9119a5988e020149e24c1e > Author: Eduard Bostina <[email protected]> > > dt-bindings: mfd: Convert TI TWL6040 to DT schema > > Convert the Texas Instruments TWL6040 audio codecs family bindings to DT > schema. > > > diff --git a/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml b/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml > > new file mode 100644 > > index 0000000000000..a93835aa91535 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mfd/ti,twl6040.yaml > > [ ... ] > > > + ti,vibrmotor-res: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: Resistance parameter for right motor > > + vddvibl_uV: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: vddvibl default voltage if it needs to be changed > > + vddvibr_uV: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: vddvibr default voltage if it needs to be changed > > [Severity: Medium] > Does this incorrectly define the property names for the vibra default voltages? > > The twl6040-vibra driver actually expects these properties to be hyphenated > and have a "ti," prefix. For example, in drivers/input/misc/twl6040-vibra.c: > > twl6040_vibra_probe() { > ... > of_property_read_u32(twl6040_core_node, "ti,vddvibl-uV", &vddvibl_uV); > of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV", &vddvibr_uV); > ... > } > > Since the vibra object sets "additionalProperties: false", won't valid device > trees using "ti,vddvibl-uV" fail schema validation? > > Conversely, if a device tree uses "vddvibl_uV" to satisfy this schema, won't > it be silently ignored by the driver at runtime? > > > + > > + required: > > + - ti,vibldrv-res > > + - ti,vibrdrv-res > > + - ti,viblmotor-res > > + - ti,vibrmotor-res > > -- > Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1 No in-tree device tree uses these two optional properties, so dtbs_check never caught them, and I carried the names over from the old txt binding. I'll fix them in v2.