Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Janani Sunil" <janani.sunil@analog.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v10 2/3] dt-bindings: iio: dac: Add AD5529R
Date: Thu, 27 Aug 2026 07:44:49 +0000	[thread overview]
Message-ID: <20260827074449.C4B3F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260827-ad5529r-driver-v10-2-38f2be07b824@analog.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Schema type mismatch for `spi-device-addr` default value.
- [Low] Schema inheritance blocked by `additionalProperties: false` in child node `patternProperties`.
--

commit 2a10366a840751ddbc9e8abde9e46cd15e15f671
Author: Janani Sunil <janani.sunil@analog.com>

dt-bindings: iio: dac: Add AD5529R

This commit introduces device tree bindings for the AD5529R 16-channel
12/16-bit high voltage digital-to-analog converter.

> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5529r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5529r.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5529r.yaml
[ ... ]
> +  spi-device-addr:
> +    minItems: 1
> +    maxItems: 4
> +    items:
> +      enum: [0, 1, 2, 3]
> +    default: 0

[Severity: Low]
Will this default value cause a dt_binding_check validation failure?

The spi-device-addr property inherits its base type from
/schemas/spi/spi-peripheral-props.yaml#, which defines it as a uint32-array.
However, adi,ad5529r.yaml sets its default value to a scalar integer 0 instead
of a JSON array like [0]. dt-schema enforces type matching on default values,
so this will cause a schema compilation and validation error.

> +    description:
> +      Hardware address of each device, selected by the ID0 and ID1 pins.
> +      Up to four AD5529R devices can share a single SPI chip select.
[ ... ]
> +patternProperties:
> +  "^channel@([0-9a-f]{1,2})$":
> +    $ref: dac.yaml
> +    type: object
> +    description: Child nodes for individual channel configuration
> +
> +    properties:
> +      reg:
> +        description:
> +          Flattened channel number across all AD5529R devices sharing the chip
> +          select. Within each 16-channel block, the physical channel number is reg % 16.
> +        minimum: 0
> +        maximum: 63
> +
> +      output-range-microvolt:
[ ... ]
> +    required:
> +      - reg
> +
> +    additionalProperties: false

[Severity: Low]
Does this block properties inherited from the referenced dac.yaml schema?

The patternProperties block for child nodes uses additionalProperties: false
alongside $ref: dac.yaml. In JSON Schema, additionalProperties only applies to
properties explicitly defined in the local properties block, so it will reject
any standard properties inherited from dac.yaml (such as label) unless
unevaluatedProperties: false is used instead.

> +
> +required:
> +  - compatible

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260827-ad5529r-driver-v10-0-38f2be07b824@analog.com?part=2

  reply	other threads:[~2026-08-27  7:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  7:34 [PATCH v10 0/3] iio: dac: Add support for AD5529R DAC Janani Sunil
2026-08-27  7:34 ` [PATCH v10 1/3] spi: dt-bindings: Add spi-device-addr peripheral property Janani Sunil
2026-08-27  7:34 ` [PATCH v10 2/3] dt-bindings: iio: dac: Add AD5529R Janani Sunil
2026-08-27  7:44   ` sashiko-bot [this message]
2026-08-27  7:34 ` [PATCH v10 3/3] iio: dac: Add AD5529R DAC driver support Janani Sunil
2026-08-27  7:50   ` sashiko-bot
2026-08-27  8:23   ` Andy Shevchenko
2026-08-27 11:17     ` Janani Sunil
2026-08-27 12:47       ` Andy Shevchenko
2026-08-27  8:30   ` Joshua Crofts
2026-08-27  9:18     ` Andy Shevchenko

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=20260827074449.C4B3F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=janani.sunil@analog.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