[PATCH 0/5] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard

Sai Krishna Potthuri posted 5 patches 1 month, 3 weeks ago
There is a newer version of this series
.../bindings/iio/adc/xilinx-xadc.txt          | 141 ---------
.../bindings/iio/adc/xilinx-xadc.yaml         | 194 ++++++++++++
drivers/iio/adc/Kconfig                       |  11 +
drivers/iio/adc/xilinx-xadc-core.c            | 283 ++++++++++++++++--
drivers/iio/adc/xilinx-xadc.h                 |   8 +
5 files changed, 475 insertions(+), 162 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
create mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.yaml
[PATCH 0/5] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard
Posted by Sai Krishna Potthuri 1 month, 3 weeks ago
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:
- Extract common probe logic into xadc_device_setup() and
xadc_device_configure().
- Add setup_channels function pointer to ops structure to support
different ways to configure the channels.
- Replace module_platform_driver() macro with custom init and exit
functions to support multiple bus interfaces.
- I2C interface support.
- Convert binding file to YAML 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/3 enables different channel configuration
approaches for various platforms.

Sai Krishna Potthuri (5):
  iio: adc: xilinx-xadc: Add helper functions for the device setup
  iio: adc: xilinx-xadc: Add setup_channels function pointer to ops
    structure
  iio: adc: xilinx-xadc: Replace module macro with custom init/exit
    functions
  iio: adc: xilinx-xadc: Add I2C interface support
  dt-bindings: iio: adc: xilinx-xadc: convert to YAML format

 .../bindings/iio/adc/xilinx-xadc.txt          | 141 ---------
 .../bindings/iio/adc/xilinx-xadc.yaml         | 194 ++++++++++++
 drivers/iio/adc/Kconfig                       |  11 +
 drivers/iio/adc/xilinx-xadc-core.c            | 283 ++++++++++++++++--
 drivers/iio/adc/xilinx-xadc.h                 |   8 +
 5 files changed, 475 insertions(+), 162 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/xilinx-xadc.yaml

-- 
2.25.1
Re: [PATCH 0/5] iio: adc: xilinx-xadc: Add I2C interface support for System Management Wizard
Posted by Andy Shevchenko 1 month, 3 weeks ago
On Fri, Feb 20, 2026 at 11:09:36AM +0530, Sai Krishna Potthuri wrote:
> 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:
> - Extract common probe logic into xadc_device_setup() and
> xadc_device_configure().
> - Add setup_channels function pointer to ops structure to support
> different ways to configure the channels.
> - Replace module_platform_driver() macro with custom init and exit
> functions to support multiple bus interfaces.
> - I2C interface support.
> - Convert binding file to YAML 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/3 enables different channel configuration
> approaches for various platforms.

Thanks, but this series (and driver) has to be refactored differently.
Please, go back to the drawing board and redesign the approach.
We have examples of the drivers in the kernel that are using platform
and I²C approaches.

-- 
With Best Regards,
Andy Shevchenko