[PATCH v5 08/10] iio: adc: ti-ads1015: use managed runtime PM setup

From: Archit Anant

Date: Wed Sep 30 2026 - 16:05:59 EST


Use devm_pm_runtime_set_active_enabled() to combine setting the device
active and enabling runtime PM.

Previously, probe explicitly called pm_runtime_set_active() followed by
devm_pm_runtime_enable(). The managed helper changes the teardown
semantics by associating runtime PM enablement with the device-managed
lifetime.

The runtime suspend and resume callbacks only update the conversion-mode
bits through regmap. They do not manipulate runtime-PM usage counts or
other shared resources such as regulators or clocks, so this change does
not introduce an additional runtime-PM reference or resource-balance
operation in this driver.

Signed-off-by: Archit Anant <architanant5@xxxxxxxxx>
---
drivers/iio/adc/ti-ads1015.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index a790f694a1a9..9312822218df 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -1046,12 +1046,9 @@ static int ads1015_probe(struct i2c_client *client)

data->conv_invalid = true;

- ret = pm_runtime_set_active(dev);
- if (ret)
- return ret;
pm_runtime_set_autosuspend_delay(dev, ADS1015_SLEEP_DELAY_MS);
pm_runtime_use_autosuspend(dev);
- ret = devm_pm_runtime_enable(dev);
+ ret = devm_pm_runtime_set_active_enabled(dev);
if (ret)
return ret;

--
2.39.5