From: sashiko-bot@kernel.org
To: "Joshua Crofts" <joshua.crofts1@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: iio: dac: add support for mcp47a1
Date: Mon, 03 Aug 2026 18:07:16 +0000 [thread overview]
Message-ID: <20260803180717.4BE651F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803-mcp47a1-add-support-v3-1-540e71b4fd2e@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The I2C addresses specified in the schema and example appear to be 8-bit write addresses instead of the 7-bit addresses required by the DT specification.
- [Low] The `reg` property schema applies an integer `enum` directly to a matrix array element, which will cause `dt_binding_check` validation to always fail.
--
--- Patch [1]: [PATCH v3 1/2] dt-bindings: iio: dac: add support for mcp47a1 ---
commit 441e840b5a2a3f037c3520c49013a55b7dc4c1bd
Author: Joshua Crofts <joshua.crofts1@gmail.com>
dt-bindings: iio: dac: add support for mcp47a1
The Microchip MCP47A1 is a 6-bit volatile Digital-to-Analog converter
which communicates via I2C.
> diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp47a1.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp47a1.yaml
> new file mode 100644
> index 0000000000000..b181fe73dce84
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp47a1.yaml
[ ... ]
> +properties:
> + compatible:
> + const: microchip,mcp47a1
> +
> + reg:
> + items:
> + - enum: [0x2e, 0x3e]
[Severity: Low]
Will this cause dt_binding_check validation to fail?
Since dt-schema parses reg values into a uint32-matrix (an array of arrays),
the items array applied to it defines a tuple schema for the outer array's
elements. This means the inner array [0x2e] will be matched against the
integer enum [0x2e, 0x3e], which will mathematically fail since an array
is not an integer.
[Severity: Medium]
Are these 8-bit write addresses instead of the 7-bit addresses required by
the Device Tree specification?
If these are indeed 8-bit addresses (as indicated by the 0 LSB and typical
Microchip datasheet conventions), they must be shifted right by 1. That would
make the correct 7-bit DT addresses 0x17 and 0x1f.
> +
> + vref-supply: true
[ ... ]
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + dac@2e {
> + compatible = "microchip,mcp47a1";
> + reg = <0x2e>;
[Severity: Medium]
Does this example propagate the DT specification violation?
Using an 8-bit write address directly in the reg property and unit name
(dac@2e) will cause the device to fail to probe or communicate, as the I2C
subsystem expects a 7-bit address.
> + vref-supply = <&vref_regulator>;
> + vdd-supply = <&vdd_regulator>;
> + };
> + };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-mcp47a1-add-support-v3-0-540e71b4fd2e@gmail.com?part=1
next prev parent reply other threads:[~2026-08-03 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 17:32 [PATCH v3 0/2] iio: dac: mcp47a1: add support for new device Joshua Crofts
2026-08-03 17:32 ` [PATCH v3 1/2] dt-bindings: iio: dac: add support for mcp47a1 Joshua Crofts
2026-08-03 18:07 ` sashiko-bot [this message]
2026-08-03 19:35 ` Joshua Crofts
2026-08-03 17:32 ` [PATCH v3 2/2] iio: dac: mcp47a1: add support for new device Joshua Crofts
2026-08-03 17:44 ` sashiko-bot
2026-08-03 19:42 ` Joshua Crofts
2026-08-05 0:14 ` [PATCH v3 0/2] " Jonathan Cameron
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=20260803180717.4BE651F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joshua.crofts1@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