[PATCH v3 0/4] iio: adc: ad799x: modernize resource management

From: Archit Anant

Date: Mon Mar 02 2026 - 08:09:23 EST


This series modernizes the ad799x driver by converting all resource
management to use the devm_ infrastructure, ultimately allowing for the
complete removal of the ad799x_remove() function and simplifying the
error paths in probe.

This series addresses the feedback from v2, where the changes were
squashed into a single patch, by splitting the logical steps into
individual, bisectable commits. It also incorporates feedback regarding
the safe ordering of regulator disablement and IIO device unregistration.

Changes in v3:
- Split the monolithic v2 patch into 4 logical commits as requested by
Andy Shevchenko.

Changes in v2:
- Incorporated feedback from David Lechner to eliminate dynamic buffer
allocation.
- Incorporated feedback from Jonathan Cameron regarding the ordering
hazards of mixing devm and manual teardown, utilizing devm_add_action
and voltage caching.

Archit Anant (4):
iio: adc: ad799x: make rx_buf static and DMA-safe
iio: adc: ad799x: cache regulator voltages during probe
iio: adc: ad799x: use devm_add_action_or_reset for regulators
iio: adc: ad799x: use devm_iio_device_register and drop remove

drivers/iio/adc/ad799x.c | 86 ++++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 43 deletions(-)

--
2.39.5