[PATCH v2 0/5] iio: adc: bcm_iproc_adc: use device-managed resources
From: mdshahid03
Date: Sun Aug 30 2026 - 13:10:10 EST
From: Mohammad Shahid <mdshahid03@xxxxxxxxx>
Changes since v1:
- Sort headers and make the driver IWYU compliant.
- Use devm_clk_get_enabled() and devm_add_action_or_reset() for
- clock and ADC cleanup.
- Use devm_mutex_init() and devm_iio_device_register(), removing
the manual cleanup paths and remove() callback.
I checked the history of IPROC_ADC_AUXIN_SCAN_ENA and the related
iProc touchscreen driver. There is no documented dependency requiring
the bit to be cleared before tsc_clk is enabled.
I also checked the touchscreen driver's shared-register handling. It
enables tsc_clk before configuring the shared REGCTL2, and its
history does not indicate an ordering requirement involving
IPROC_ADC_AUXIN_SCAN_ENA.
Therefore, devm_clk_get_enabled() is used as suggested.
linux/delay.h is retained because the driver directly uses udelay().
---
Mohammad Shahid (5):
iio: adc: bcm_iproc_adc: sort headers alphabetically
iio: adc: bcm_iproc_adc: fix include dependencies
iio: adc: bcm_iproc_adc: use devm-managed cleanup
iio: adc: bcm_iproc_adc: use devm-managed mutex initialization
iio: adc: bcm_iproc_adc: use devm_iio_device_register()
drivers/iio/adc/bcm_iproc_adc.c | 62 ++++++++++++++-------------------
1 file changed, 26 insertions(+), 36 deletions(-)
--
2.43.0