Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Janani Sunil" <janani.sunil@analog.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 2/7] dt-bindings: iio: adc: microchip,mcp3564: Add spi-device-addr
Date: Wed, 22 Jul 2026 08:05:29 +0000	[thread overview]
Message-ID: <20260722080529.829941F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260722-ad5529r-driver-v7-2-7781cd74ad75@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The dt-binding introduces `spi-device-addr` to replace the deprecated `microchip,hw-device-address` and removes it from the required list, but the driver has not been updated to parse the new generic property.
--

--- Patch [2]: [PATCH v7 2/7] dt-bindings: iio: adc: microchip,mcp3564: Add spi-device-addr ---
commit a3bb549053e31953c445885e8d6cb1988514c7b0
Author: Janani Sunil <janani.sunil@analog.com>

dt-bindings: iio: adc: microchip,mcp3564: Add spi-device-addr
    
This commit introduces the generic spi-device-addr property to the mcp3564
binding. It also marks the existing vendor-specific 
microchip,hw-device-address property as deprecated and removes it from the 
required list.

> diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml
> index 6753192761971..de1ea289e7f52 100644
> --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3564.yaml
[ ... ]
> @@ -91,6 +92,12 @@ properties:
>        clocking of the device address (BITS[7:6] - top two bits of COMMAND BYTE
>        which is first one on the wire).
>  
> +  spi-device-addr:
> +    maxItems: 1
> +    items:
> +      enum: [0, 1, 2, 3]
> +    default: [1]
> +
>    "#io-channel-cells":
>      const: 1
[ ... ]
> @@ -123,7 +130,6 @@ dependencies:
>  required:
>    - compatible
>    - reg
> -  - microchip,hw-device-address
>    - spi-max-frequency
>  
>  allOf:

[Severity: High]
Since the old microchip,hw-device-address property is removed from the
required list here and replaced by spi-device-addr, does the mcp3564 driver
need an accompanying update to parse the new generic property?

Currently, if a device tree author updates their configuration to use the new
spi-device-addr property following this binding, mcp3564_config() still
explicitly checks only for the deprecated property and will silently fall
back to 0x1:

drivers/iio/adc/mcp3564.c:mcp3564_config() {
	unsigned int tmp = 0x01;
	...
	device_property_read_u32(dev, "microchip,hw-device-address", &tmp);
	...
}

Could this cause hardware state machine initialization and SPI communication
to fail for any device physically strapped to addresses 0, 2, or 3 if they
drop the old property?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260722-ad5529r-driver-v7-0-7781cd74ad75@analog.com?part=2

  reply	other threads:[~2026-07-22  8:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  7:54 [PATCH v7 0/7] iio: dac: Add support for AD5529R DAC Janani Sunil
2026-07-22  7:54 ` [PATCH v7 1/7] spi: dt-bindings: Add spi-device-addr peripheral property Janani Sunil
2026-07-22 16:39   ` Conor Dooley
2026-07-22  7:54 ` [PATCH v7 2/7] dt-bindings: iio: adc: microchip,mcp3564: Add spi-device-addr Janani Sunil
2026-07-22  8:05   ` sashiko-bot [this message]
2026-07-22 16:40   ` Conor Dooley
2026-07-22  7:54 ` [PATCH v7 3/7] iio: adc: mcp3564: Add support for spi-device-addr Janani Sunil
2026-07-22 16:45   ` Conor Dooley
2026-07-22 17:02     ` Marius.Cristea
2026-07-22 17:06   ` Marius.Cristea
2026-07-22  7:54 ` [PATCH v7 4/7] dt-bindings: iio: adc: microchip,mcp3911: Add spi-device-addr Janani Sunil
2026-07-22  8:05   ` sashiko-bot
2026-07-22 16:41   ` Conor Dooley
2026-07-22  7:54 ` [PATCH v7 5/7] iio: adc: mcp3911: Add support for spi-device-addr Janani Sunil
2026-07-22 16:41   ` Conor Dooley
2026-07-22 16:43     ` Conor Dooley
2026-07-22  7:54 ` [PATCH v7 6/7] dt-bindings: iio: dac: Add AD5529R Janani Sunil
2026-07-22  8:11   ` sashiko-bot
2026-07-22 16:39   ` Conor Dooley
2026-07-22  7:54 ` [PATCH v7 7/7] iio: dac: Add AD5529R DAC driver support Janani Sunil
2026-07-22  8:14   ` 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=20260722080529.829941F000E9@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