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

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The dt-bindings update deprecates `microchip,device-addr` in favor of the new generic `spi-device-addr` property, but the `mcp3911` driver was not updated to parse it. If a device tree uses the newly recommended `spi-device-addr` property, the driver will fail to parse it, fall back to device address 0, and fail to communicate with hardware configured for other addresses.
--

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

This commit adds the generic spi-device-addr property to the binding.
It also deprecates the existing vendor-specific microchip,device-addr
property.

> diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> index 3a69ec60edb91..36da2bee1db28 100644
> --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
> @@ -57,6 +57,13 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      enum: [0, 1, 2, 3]
>      default: 0
> +    deprecated: true
> +
> +  spi-device-addr:
> +    maxItems: 1
> +    items:
> +      enum: [0, 1, 2, 3]
> +    default: [0]

[Severity: High]
Is the driver updated to parse this new property?

Looking at mcp3911_probe() in drivers/iio/adc/mcp3911.c, the driver only
handles the deprecated properties:

	ret = device_property_read_u32(dev, "microchip,device-addr", &adc->dev_addr);
	if (ret)
		device_property_read_u32(dev, "device-addr", &adc->dev_addr);

If a modernized device tree uses the newly recommended spi-device-addr
property instead of microchip,device-addr, will the driver fail to parse it
and leave adc->dev_addr at 0?

Could this cause communication failures with hardware configured for non-zero
addresses?

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

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

Thread overview: 12+ 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  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
2026-07-22  7:54 ` [PATCH v7 3/7] iio: adc: mcp3564: Add support for spi-device-addr Janani Sunil
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 [this message]
2026-07-22  7:54 ` [PATCH v7 5/7] iio: adc: mcp3911: Add support for spi-device-addr Janani Sunil
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  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=20260722080555.560FF1F00A3D@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