From: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Nuno Sa <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>,
"Simek, Michal" <michal.simek@amd.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"saikrishna12468@gmail.com" <saikrishna12468@gmail.com>,
"git (AMD-Xilinx)" <git@amd.com>
Subject: Re: [PATCH v2 3/4] iio: adc: xilinx-xadc: Add I2C interface support
Date: Mon, 23 Mar 2026 17:01:43 +0530 [thread overview]
Message-ID: <8c8fa211-6244-43d3-9350-856301075e2b@amd.com> (raw)
In-Reply-To: <acEbZ0O3HKrGx0u1@ashevche-desk.local>
Hi Andy Shevchenko,
> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@intel.com>
> Sent: Monday, March 23, 2026 4:22 PM
> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>
> Cc: Jonathan Cameron <jic23@kernel.org>; David Lechner
> <dlechner@baylibre.com>; Nuno Sa <nuno.sa@analog.com>; Andy
> Shevchenko <andy@kernel.org>; Simek, Michal <michal.simek@amd.com>;
> Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>;
> Conor Dooley <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; saikrishna12468@gmail.com; git (AMD-Xilinx)
> <git@amd.com>
> Subject: Re: [PATCH v2 3/4] iio: adc: xilinx-xadc: Add I2C interface support
>
> On Mon, Mar 23, 2026 at 01:15:04PM +0530, Sai Krishna Potthuri wrote:
> > Add I2C interface support for Xilinx System Management Wizard IP along
> > with the existing AXI memory-mapped interface. This support enables
> > monitoring the voltage and temperature on UltraScale+ devices where
> > the System Management Wizard is connected via I2C.
> >
> > Key changes:
> > - Implement 32-bit DRP(Dynamic Reconfiguration Port) packet format as per
> > Xilinx PG185 specification.
> > - Add separate I2C probe with xadc_i2c_of_match_table to handle same
> > compatible string("xlnx,system-management-wiz-1.3") on I2C bus.
> > - Implement delayed version of hardware initialization for I2C interface
> > to handle the case where System Management Wizard IP is not ready
> during
> > the I2C probe.
> > - Add NULL checks for get_dclk_rate callback function in sampling rate
> > functions to support interfaces without clock control
> > - Create separate iio_info structure(xadc_i2c_info) without event
> > callbacks for I2C devices
> > - Add xadc_i2c_transaction() function to handle I2C read/write
> > operations
> > - Add XADC_TYPE_US_I2C type to distinguish I2C interface from AXI
>
> ...
>
> > - if (xadc->ops->type == XADC_TYPE_US)
> > + if (xadc->ops->type == XADC_TYPE_US ||
> > + xadc->ops->type == XADC_TYPE_US_I2C)
>
> Can be one line.
>
> > return 0;
>
> ...
>
> > /* UltraScale has only one ADC and supports only continuous mode
> */
> > - if (xadc->ops->type == XADC_TYPE_US)
> > + if (xadc->ops->type == XADC_TYPE_US ||
> > + xadc->ops->type == XADC_TYPE_US_I2C)
>
>
> Ditto.
>
> > return XADC_CONF1_SEQ_CONTINUOUS;
>
> ...
>
> > int xadc_write_samplerate(struct xadc *xadc, int val) {
> > - unsigned long clk_rate = xadc_get_dclk_rate(xadc);
> > + unsigned long clk_rate;
> > unsigned int div;
> >
> > + if (!xadc->ops->get_dclk_rate)
> > + return -EOPNOTSUPP;
>
> > + clk_rate = xadc_get_dclk_rate(xadc);
> > +
>
> Unneeded blank line.
>
> Also, don't you asked for options?
This callback is defined for all other platforms except I2C.
Currently for I2c interface we are not supporting any configuration, it
is used only to read the channels.
>
> > if (!clk_rate)
> > return -EINVAL;
>
> ...
>
> > + i2c_set_clientdata(client, indio_dev);
>
> Is it used?
No, will remove this one.
Regards
Sai Krishna
next prev parent reply other threads:[~2026-03-23 11:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 7:45 [PATCH v2 0/4] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard Sai Krishna Potthuri
2026-03-23 7:45 ` [PATCH v2 1/4] iio: adc: xilinx-xadc: Split driver into core and platform files Sai Krishna Potthuri
2026-03-23 10:47 ` Andy Shevchenko
2026-03-26 5:39 ` kernel test robot
2026-03-27 18:58 ` kernel test robot
2026-03-23 7:45 ` [PATCH v2 2/4] iio: adc: xilinx-xadc: Add .setup_channels() to struct xadc_ops Sai Krishna Potthuri
2026-03-23 7:45 ` [PATCH v2 3/4] iio: adc: xilinx-xadc: Add I2C interface support Sai Krishna Potthuri
2026-03-23 10:52 ` Andy Shevchenko
2026-03-23 11:31 ` Sai Krishna Potthuri [this message]
2026-03-23 11:46 ` Andy Shevchenko
2026-03-23 12:16 ` Sai Krishna Potthuri
2026-03-23 20:26 ` Jonathan Cameron
2026-03-23 7:45 ` [PATCH v2 4/4] dt-bindings: iio: adc: xlnx,axi-xadc: convert to DT schema Sai Krishna Potthuri
2026-03-23 13:24 ` Rob Herring (Arm)
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=8c8fa211-6244-43d3-9350-856301075e2b@amd.com \
--to=sai.krishna.potthuri@amd.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=git@amd.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=saikrishna12468@gmail.com \
/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