From: Dileep Kumar Nagavarapu <DileepKumar.Nagavarapu@amd.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Michal Simek" <michal.simek@amd.com>,
"Conall O'Griofa" <conall.ogriofa@amd.com>
Cc: <linux-iio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <git@amd.com>,
Dileep Kumar Nagavarapu <DileepKumar.Nagavarapu@amd.com>
Subject: [PATCH v3 0/6] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard
Date: Wed, 29 Jul 2026 18:24:49 +0530 [thread overview]
Message-ID: <20260729125455.95893-1-DileepKumar.Nagavarapu@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.
This series was originally posted by Sai Krishna Potthuri.
Link:https://lore.kernel.org/all/20260323074505.3853353-1-sai.krishna.potthuri@amd.com/
I will be maintaining the series going forward and posting updated
revisions.
Changes in v3:
-> 1/6 - Modernized the driver code with latest kernel coding styles
and guidelines.
- Restored one-variable-per-line declarations where no
functional change was intended.
- Added unit suffixes to timing and clock-rate constants.
- Replaced GENMASK() and FIELD_PREP() in appropriate places.
- Added guard(spinlock_irq) helper to manage the spinlock
automatically on scope exit.
- Added MAINTAINERS entry for XILINX XADC driver.
-> 2/6 - Refactored the xadc_setup_buffer_and_triggers function
with only two arguments.
- Added xadc_device_setup() and xadc_device_configure() to handle
device initialization and configuration separately.
-> 3/6 - Added IIO_XADC namespace to all exported symbols and
imported the namespace in platform specific modulue.
- Spliting the driver with modrern driver changes.
-> 4/6 - Added .setup_channels() to handle custom channel setup
and configuration.
-> 5/6 - Replaced mutex initialization with devm_mutex_init()
- Removed unused i2c_set_clientdata() usage.
- Added comments describing the DRP packet layout used
for I2C transactions.
- Added comment for hardware initialization check from xadc i2c
write and read functions.
- Wrapped Kconfig help text to conform to kernel style guidelines.
- Switched device setup error handling to dev_err_probe().
-> 6/6 - Removed write edge default configuration in XADCIF_CFG register.
-> Dropped the binding to YAML conversion patch as this is already sent by
Pramod Maurya and is in discussion.
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.
Dileep Kumar Nagavarapu (6):
iio: adc: xilinx-xadc: Modernize driver code
iio: adc: xilinx-xadc: Add helper functions for the device setup
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
iio: adc: xilinx-xadc: Correct Write edge in CFG
MAINTAINERS | 7 +
drivers/iio/adc/Kconfig | 23 +-
drivers/iio/adc/Makefile | 6 +-
drivers/iio/adc/xilinx-xadc-core.c | 886 ++------------
drivers/iio/adc/xilinx-xadc-events.c | 54 +-
drivers/iio/adc/xilinx-xadc-i2c.c | 228 ++++
...inx-xadc-core.c => xilinx-xadc-platform.c} | 1043 ++---------------
drivers/iio/adc/xilinx-xadc.h | 108 +-
8 files changed, 609 insertions(+), 1746 deletions(-)
create mode 100644 drivers/iio/adc/xilinx-xadc-i2c.c
copy drivers/iio/adc/{xilinx-xadc-core.c => xilinx-xadc-platform.c} (34%)
--
2.34.1
next reply other threads:[~2026-07-29 12:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 12:54 Dileep Kumar Nagavarapu [this message]
2026-07-29 12:54 ` [PATCH v3 1/6] iio: adc: xilinx-xadc: Modernize driver code Dileep Kumar Nagavarapu
2026-07-29 13:43 ` Pandey, Radhey Shyam
2026-07-29 14:43 ` Joshua Crofts
2026-07-29 12:54 ` [PATCH v3 2/6] iio: adc: xilinx-xadc: Add helper functions for the device setup Dileep Kumar Nagavarapu
2026-07-29 12:54 ` [PATCH v3 3/6] iio: adc: xilinx-xadc: Split driver into core and platform files Dileep Kumar Nagavarapu
2026-07-30 19:52 ` Uwe Kleine-König
2026-08-10 16:40 ` Andy Shevchenko
2026-08-15 1:44 ` Jonathan Cameron
2026-07-29 12:54 ` [PATCH v3 4/6] iio: adc: xilinx-xadc: Add .setup_channels() to struct xadc_ops Dileep Kumar Nagavarapu
2026-08-01 16:47 ` David Lechner
2026-08-01 16:49 ` David Lechner
2026-07-29 12:54 ` [PATCH v3 5/6] iio: adc: xilinx-xadc: Add I2C interface support Dileep Kumar Nagavarapu
2026-07-29 12:54 ` [PATCH v3 6/6] iio: adc: xilinx-xadc: Correct Write edge in CFG Dileep Kumar Nagavarapu
2026-08-01 16:51 ` David Lechner
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=20260729125455.95893-1-DileepKumar.Nagavarapu@amd.com \
--to=dileepkumar.nagavarapu@amd.com \
--cc=andy@kernel.org \
--cc=conall.ogriofa@amd.com \
--cc=dlechner@baylibre.com \
--cc=git@amd.com \
--cc=jic23@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 \
/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®