Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v6 3/6] dt-bindings: mfd: motorola-cpcap: convert to DT schema
Date: Wed, 20 May 2026 18:52:18 +0000	[thread overview]
Message-ID: <20260520185219.576501F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260520182124.117863-4-clamor95@gmail.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The YAML conversion introduces structural differences and omits previously required properties, causing schema validation to fail for existing in-tree device trees.
- [Medium] Incorrect use of 'additionalProperties: false' in conjunction with inherited schemas via 'allOf: - $ref', blocking standard SPI properties.
- [Medium] The `spi-cs-high` property was required in the original TXT binding but is missing from the YAML `required` list.
- [Medium] The YAML binding strictly requires exactly two compatible strings, contradicting the original TXT binding which allowed 'One or both'.
--

commit a23d8229dfec6cdc65afe36d12b859535df8cfc9
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.

> 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 this strict array configuration restrict compatible strings too much?
The original txt binding indicated that "One or both" strings were
acceptable, but this yaml structure enforces exactly both strings in this
specific order. Could this cause a regression for hardware implementations
that only use a single compatible string, which the driver supports?

> +
> +  reg:
> +    maxItems: 1

[Severity: High]
Are #address-cells and #size-cells missing from this top-level node?
The original txt binding explicitly required these, and existing in-tree
device trees (like arch/arm/boot/dts/ti/omap/motorola-cpcap-mapphone.dtsi)
use them. With additionalProperties: false set, will this cause a regression
where existing valid dts files fail validation?

[ ... ]

> +  audio-codec:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
[ ... ]
> +      ports:
> +        $ref: /schemas/graph.yaml#/properties/ports
> +
> +        properties:
> +          port@0:
> +            $ref: /schemas/graph.yaml#/properties/port
> +            description: port connected to the Stereo HiFi DAC
> +
> +          port@1:
> +            $ref: /schemas/graph.yaml#/properties/port
> +            description: port connected to the Voice DAC
> +
> +        required:
> +          - port@0
> +          - port@1

[Severity: High]
Does this structurally conflict with existing in-tree device trees?
The new schema requires a ports container for the audio codec, but existing
in-tree device trees define port@0 and port@1 directly under the audio-codec
node without a wrapper. Since no patch in this series updates the
corresponding dtsi files, won't this cause a regression where existing device
trees are incorrectly rejected?

[ ... ]

> +  key-power:
> +    $ref: /schemas/input/motorola,cpcap-pwrbutton.yaml#

[Severity: High]
Will this correctly match the existing device tree nodes?
The schema expects the subnode to be named key-power, but existing in-tree
device trees use the name button (e.g., power_button: button { ... }).
This mismatch will likely cause a regression for the subnode validation.

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupt-controller
> +  - "#interrupt-cells"
> +  - spi-max-frequency

[Severity: Medium]
Should spi-cs-high be included in this required list?
The original txt binding explicitly listed spi-cs-high as a required property,
and the pmic physically requires an active-high spi chip select to function.
If it is omitted from this list, could a device tree missing this hardware
constraint incorrectly pass schema validation?

> +
> +additionalProperties: false

[Severity: Medium]
Should this use unevaluatedProperties: false instead of
additionalProperties: false?

When inheriting from another schema like spi-peripheral-props.yaml via an
allOf reference, additionalProperties: false will reject the inherited
properties unless they are manually redefined in this file. Using
unevaluatedProperties would properly handle the inherited spi properties
and remove the need to manually declare spi-cs-high, spi-cpol, and
spi-cpha above.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260520182124.117863-1-clamor95@gmail.com?part=3

  reply	other threads:[~2026-05-20 18:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 18:21 [PATCH v6 0/6] mfd: cpcap: convert documentation to schema and add Mot board support Svyatoslav Ryhel
2026-05-20 18:21 ` [PATCH v6 1/6] dt-bindings: leds: leds-cpcap: convert to DT schema Svyatoslav Ryhel
2026-05-20 20:13   ` Rob Herring (Arm)
2026-05-20 18:21 ` [PATCH v6 2/6] dt-bindings: input: cpcap-pwrbutton: " Svyatoslav Ryhel
2026-05-20 20:13   ` Rob Herring (Arm)
2026-05-20 18:21 ` [PATCH v6 3/6] dt-bindings: mfd: motorola-cpcap: " Svyatoslav Ryhel
2026-05-20 18:52   ` sashiko-bot [this message]
2026-05-20 18:21 ` [PATCH v6 4/6] dt-bindings: mfd: motorola-cpcap: document Mapphone and Mot CPCAP Svyatoslav Ryhel
2026-05-20 18:21 ` [PATCH v6 5/6] mfd: motorola-cpcap: diverge configuration per-board Svyatoslav Ryhel
2026-05-20 19:28   ` sashiko-bot
2026-05-20 18:21 ` [PATCH v6 6/6] mfd: motorola-cpcap: add support for Mot CPCAP composition Svyatoslav Ryhel

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=20260520185219.576501F000E9@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=linux-input@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