From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: linux-input@vger.kernel.org, robh@kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-leds@vger.kernel.org, dmitry.torokhov@gmail.com,
lee@kernel.org
Subject: Re: [PATCH v7 3/6] dt-bindings: mfd: motorola-cpcap: convert to DT schema
Date: Tue, 21 Jul 2026 10:15:26 +0000 [thread overview]
Message-ID: <20260721101526.D2C5C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260721095654.429346-4-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
- [Medium] YAML schema omits `#address-cells` and `#size-cells` properties for the root node, causing validation failures for existing device trees.
- [Medium] Schema strictly expects the power button node to be named `key-power`, breaking validation for the legacy `button` node.
- [Medium] The `audio-codec` schema expects a `ports` wrapper, breaking validation for legacy direct `port@0` definitions.
- [Low] The `spi-cs-high` property was dropped from the schema's `required` list.
- [Low] Commit message description is not capitalized, violating MFD subsystem guidelines.
--
--- Patch [3]: [PATCH v7 3/6] dt-bindings: mfd: motorola-cpcap: convert to DT schema ---
commit 4de37a9bd5e5179740a9f015e1900ab235da93ae
Author: Svyatoslav Ryhel <clamor95@gmail.com>
dt-bindings: mfd: motorola-cpcap: convert to DT schema
Convert devicetree bindings for the Motorola CPCAP MFD from TXT to YAML.
> dt-bindings: mfd: motorola-cpcap: convert to DT schema
[Severity: Low]
This isn't a bug, but the MFD subsystem guidelines require the description
after the subsystem prefix to be capitalized. Should "convert" be "Convert"?
> diff --git a/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
> new file mode 100644
> index 0000000000000..76705ea56805a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
> @@ -0,0 +1,403 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/motorola,cpcap.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Motorola CPCAP PMIC MFD
> +
> +maintainers:
> + - Svyatoslav Ryhel <clamor95@gmail.com>
> +
> +allOf:
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> + compatible:
> + items:
> + - const: motorola,cpcap
> + - const: st,6556002
[Severity: Medium]
Does omitting #address-cells and #size-cells from the properties block
break validation for existing device trees?
Because this schema sets additionalProperties: false, running make dtbs_check
against existing in-tree device trees (like
arch/arm/boot/dts/ti/omap/motorola-cpcap-mapphone.dtsi, which uses
#address-cells = <1> and #size-cells = <0> on the pmic@0 node) will falsely
report validation errors.
[ ... ]
> + audio-codec:
> + type: object
> + additionalProperties: false
> +
> + properties:
> + interrupts:
> + items:
> + - description: headset detect interrupt
> + - description: microphone bias 2 detect interrupt
> +
> + interrupt-names:
> + items:
> + - const: hs
> + - const: mb2
> +
> + "#sound-dai-cells":
> + const: 1
> +
> + VAUDIO-supply:
> + description:
> + Codec power supply, usually VAUDIO regulator of CPCAP.
> +
> + ports:
[Severity: Medium]
Will this strict ports wrapper requirement cause validation failures for
legacy device trees?
Existing device trees place port@0 directly inside the audio-codec node:
arch/arm/boot/dts/ti/omap/motorola-cpcap-mapphone.dtsi:
cpcap_audio: audio-codec {
...
port@0 {
cpcap_audio_codec0: endpoint { ... };
};
};
With additionalProperties: false set on the audio-codec node, dtbs_check
will flag these direct ports as illegal properties.
[ ... ]
> + charger:
> + $ref: /schemas/power/supply/cpcap-charger.yaml#
> +
> + key-power:
> + $ref: /schemas/input/motorola,cpcap-pwrbutton.yaml#
[Severity: Medium]
Does hardcoding the node name as key-power break validation for the legacy
button node?
Existing device trees use the button node name:
arch/arm/boot/dts/ti/omap/motorola-cpcap-mapphone.dtsi:
power_button: button {
compatible = "motorola,cpcap-pwrbutton";
...
};
Since this schema enforces the exact name key-power, make dtbs_check
will flag the existing button node as an invalid property.
[ ... ]
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - interrupt-controller
> + - "#interrupt-cells"
> + - spi-max-frequency
[Severity: Low]
Is it intentional to drop spi-cs-high from this list?
The legacy text binding explicitly documented spi-cs-high as a required
property, which reflects the hardware's active-high chip select requirement.
Omitting it here relaxes the constraint and might allow inaccurate device trees
to pass validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721095654.429346-1-clamor95@gmail.com?part=3
next prev parent reply other threads:[~2026-07-21 10:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:56 [PATCH v7 0/6] mfd: cpcap: convert documentation to schema and add Mot board support Svyatoslav Ryhel
2026-07-21 9:56 ` [PATCH v7 1/6] dt-bindings: leds: leds-cpcap: convert to DT schema Svyatoslav Ryhel
2026-07-21 10:06 ` sashiko-bot
2026-07-21 12:01 ` Rob Herring (Arm)
2026-07-21 9:56 ` [PATCH v7 2/6] dt-bindings: input: cpcap-pwrbutton: " Svyatoslav Ryhel
2026-07-21 10:08 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 3/6] dt-bindings: mfd: motorola-cpcap: " Svyatoslav Ryhel
2026-07-21 10:15 ` sashiko-bot [this message]
2026-07-21 9:56 ` [PATCH v7 4/6] dt-bindings: mfd: motorola-cpcap: document Mapphone and Mot CPCAP Svyatoslav Ryhel
2026-07-21 10:16 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 5/6] mfd: motorola-cpcap: diverge configuration per-board Svyatoslav Ryhel
2026-07-21 10:23 ` sashiko-bot
2026-07-21 9:56 ` [PATCH v7 6/6] mfd: motorola-cpcap: add support for Mot CPCAP composition Svyatoslav Ryhel
2026-07-21 10:20 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721101526.D2C5C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox