Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Manish Baing" <manishbaing2789@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak4118: Convert DT schema
Date: Sun, 24 May 2026 12:44:02 +0000	[thread overview]
Message-ID: <20260524124403.57DC51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260524123415.108301-1-manishbaing2789@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] The schema conversion incorrectly replaces the 'irq-gpios' property with 'interrupts', breaking compatibility with existing device trees and the driver.
- [High] The 'reset-gpios' and 'irq-gpios' properties are missing from the YAML 'required' list, weakening schema constraints.
--

commit 0e4f9fd8065be8e0dd8e4f0d56bb269c25f2d4bb
Author: Manish Baing <manishbaing2789@gmail.com>

ASoC: dt-bindings: sound: asahi-kasei,ak4118: Convert DT schema

Convert the Asahi Kasei AK4118 S/PDIF transceiver bindings from text format
to YAML schema.

> diff --git a/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml
> new file mode 100644
> index 0000000000000..54cee45ac0513
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/asahi-kasei,ak4118.yaml
[ ... ]
> @@ -0,0 +1,57 @@
[ ... ]
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  interrupts:
> +    maxItems: 1

[Severity: Critical]
Does changing the property from irq-gpios to interrupts cause a regression
for existing device trees and the driver?

Looking at the original text binding, irq-gpios was specified. The driver in
sound/soc/codecs/ak4118.c fetches the interrupt line as a gpio:

devm_gpiod_get(&i2c->dev, "irq", GPIOD_IN)

Since the schema sets unevaluatedProperties to false, existing device trees
containing irq-gpios will fail validation.

Additionally, if new device trees use interrupts instead, won't the driver
fail during probe due to a missing gpio?

> +
> +  reset-gpios:
> +    maxItems: 1
> +    description: GPIO used for the Reset pin
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#sound-dai-cells"

[Severity: High]
Should reset-gpios and irq-gpios be included in this required list?

The original ak4118.txt binding marked both of these as required properties.
The driver unconditionally calls devm_gpiod_get() for both reset and irq
rather than the optional variants.

Omitting them here could allow incomplete device trees to silently pass
schema validation but still fail at runtime during the driver probe.

> +
> +unevaluatedProperties: false

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

      reply	other threads:[~2026-05-24 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-24 12:33 [PATCH] ASoC: dt-bindings: sound: asahi-kasei,ak4118: Convert DT schema Manish Baing
2026-05-24 12:44 ` sashiko-bot [this message]

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=20260524124403.57DC51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=manishbaing2789@gmail.com \
    --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