[PATCH v5 14/16] iio: adc: xilinx-xadc: Split driver into core and platform files

Andy Shevchenko andriy.shevchenko at intel.com
Tue Nov 10 08:29:38 PST 2026


On Tue, Nov 10, 2026 at 10:31:59AM +0530, Dileep Kumar Nagavarapu wrote:
> Split the xilinx-xadc-core.c into separate core and platform specific
> files to prepare for I2C interface support.
> 
> xilinx-xadc-core.c is reorganized as follows:
> xilinx-xadc-core.c:
>   - Platform-independent IIO/ADC operations
>   - Channel definitions and management
>   - Buffer and trigger management
>   - Device tree parsing
> 
> xilinx-xadc-platform.c:
>   - ZYNQ platform (FIFO-based) register access and interrupt handling
>   - AXI platform (memory-mapped) register access and interrupt handling
>   - Platform-specific setup and configuration
>   - Platform device probe function
> 
> Update Kconfig to introduce XILINX_XADC_CORE as a helper module selected
> by XILINX_XADC and update Makefile to build the split modules:
>   - xilinx-xadc-common.o (core + events)
>   - xilinx-xadc-platform.o (platform-specific)
> 
> Reorganize the code with no behavioral changes.
> 
> Co-developed-by: Sai Krishna Potthuri <sai.krishna.potthuri at amd.com>
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri at amd.com>
> Signed-off-by: Dileep Kumar Nagavarapu <dileepkumar.nagavarapu at amd.com>
> ---
>  drivers/iio/adc/Kconfig                       |   8 +-
>  drivers/iio/adc/Makefile                      |   5 +-
>  drivers/iio/adc/xilinx-xadc-core.c            | 690 +--------------
>  drivers/iio/adc/xilinx-xadc-events.c          |   1 +
>  ...inx-xadc-core.c => xilinx-xadc-platform.c} | 818 +-----------------
>  drivers/iio/adc/xilinx-xadc.h                 |  27 +
>  6 files changed, 72 insertions(+), 1477 deletions(-)

This is weird statistics... I think it's a bug in Git. What it did, it copies
-core.c twice and uses statistics on each file after that without duplicating
the *original* amount of lines.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list