mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
To: Jonathan Cameron <jic23@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Nuno Sa <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>,
	Michal Simek <michal.simek@amd.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: <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.com>,
	Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Subject: [PATCH v2 0/4] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard
Date: Mon, 23 Mar 2026 13:15:01 +0530	[thread overview]
Message-ID: <20260323074505.3853353-1-sai.krishna.potthuri@amd.com> (raw)

The existing driver only supported AXI memory-mapped access to the System
Management Wizard IP. This series extends the driver to support I2C-based
access, which is particularly useful for System Controller usecases.

Key Changes:
- Split the xilinx-xadc-core.c file into two files(xilinx-xadc-core.c and
  xilinx-xadc-platform.c)
- Add required helper functions and callbacks
- Add channel configuration via callback mechanism
- New I2C driver for UltraScale+ System Management Wizard for basic
  voltage and temperature monitoring
- Converted text binding to YAML schema format

Note: We are working on x86 platform support where fixed channel
configuration is used(no DT support). The .setup_channels() function
pointer introduced in patch 2/4 enables different channel configuration
approaches for various platforms.

Changes in v2:
-> 1/4 - Split the xilinx-xadc-core.c file into two files
         xilinx-xadc-core.c and xilinx-xadc-platform.c(comments from Andy).
-> 2/4 - Referred as .setup_channels instead of setup_channels.
-> 3/4 - Created separate functions for i2c read and write.
       - Created separate file for i2c interface handling.
-> 4/4(comments from Krzysztof)
       - Removed $defs and use it directly under xlnx,channels.
       - Documented the error information in the commit message due to
         vendor prefix properties.
       - Kept only one example as there is not much differences.


Sai Krishna Potthuri (4):
  iio: adc: xilinx-xadc: Split driver into core and platform files
  iio: adc: xilinx-xadc: Add .setup_channels() to struct xadc_ops
  iio: adc: xilinx-xadc: Add I2C interface support
  dt-bindings: iio: adc: xlnx,axi-xadc: convert to DT schema

 .../bindings/iio/adc/xilinx-xadc.txt          | 141 ---
 .../bindings/iio/adc/xlnx,axi-xadc.yaml       | 154 ++++
 drivers/iio/adc/Kconfig                       |  23 +-
 drivers/iio/adc/Makefile                      |   6 +-
 drivers/iio/adc/xilinx-xadc-core.c            | 814 +++---------------
 drivers/iio/adc/xilinx-xadc-i2c.c             | 215 +++++
 drivers/iio/adc/xilinx-xadc-platform.c        | 668 ++++++++++++++
 drivers/iio/adc/xilinx-xadc.h                 |  33 +
 8 files changed, 1193 insertions(+), 861 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/xlnx,axi-xadc.yaml
 create mode 100644 drivers/iio/adc/xilinx-xadc-i2c.c
 create mode 100644 drivers/iio/adc/xilinx-xadc-platform.c

-- 
2.25.1


             reply	other threads:[~2026-03-23  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23  7:45 Sai Krishna Potthuri [this message]
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
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=20260323074505.3853353-1-sai.krishna.potthuri@amd.com \
    --to=sai.krishna.potthuri@amd.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

all inboxes | Powered by JetHome®