[PATCH 28/80] iio: adc: Remove redundant pm_runtime_mark_last_busy() calls
Jonathan Cameron
Jonathan.Cameron at huawei.com
Fri Jul 4 02:09:14 PDT 2025
On Fri, 4 Jul 2025 10:54:19 +0300
Sakari Ailus <sakari.ailus at linux.intel.com> wrote:
> pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
> pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
> to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
> pm_runtime_mark_last_busy().
>
> Signed-off-by: Sakari Ailus <sakari.ailus at linux.intel.com>
> ---
> The cover letter of the set can be found here
> <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
>
> In brief, this patch depends on PM runtime patches adding marking the last
> busy timestamp in autosuspend related functions. The patches are here, on
> rc2:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
> pm-runtime-6.17-rc1
>
> drivers/iio/adc/ab8500-gpadc.c | 1 -
> drivers/iio/adc/at91-sama5d2_adc.c | 10 ----------
> drivers/iio/adc/imx8qxp-adc.c | 2 --
> drivers/iio/adc/imx93_adc.c | 1 -
> drivers/iio/adc/rcar-gyroadc.c | 1 -
> drivers/iio/adc/rzg2l_adc.c | 3 ---
> drivers/iio/adc/stm32-adc-core.c | 1 -
> drivers/iio/adc/stm32-adc.c | 7 -------
> drivers/iio/adc/sun4i-gpadc-iio.c | 2 --
> drivers/iio/adc/ti-ads1015.c | 1 -
> drivers/iio/adc/ti-ads1100.c | 1 -
> drivers/iio/adc/ti-ads1119.c | 2 --
> 12 files changed, 32 deletions(-)
>
> diff --git a/drivers/iio/adc/ab8500-gpadc.c b/drivers/iio/adc/ab8500-gpadc.c
> index f3b057f92310..8eaa1dd6a89b 100644
> --- a/drivers/iio/adc/ab8500-gpadc.c
> +++ b/drivers/iio/adc/ab8500-gpadc.c
> @@ -607,7 +607,6 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
> }
>
> /* This eventually drops the regulator */
> - pm_runtime_mark_last_busy(gpadc->dev);
> pm_runtime_put_autosuspend(gpadc->dev);
>
> return (high_data << 8) | low_data;
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index c3450246730e..67846fefe21a 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -896,7 +896,6 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
> emr |= osr | AT91_SAMA5D2_TRACKX(trackx);
> at91_adc_writel(st, EMR, emr);
>
> - pm_runtime_mark_last_busy(st->dev);
> pm_runtime_put_autosuspend(st->dev);
>
> st->oversampling_ratio = oversampling_ratio;
> @@ -971,7 +970,6 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
> AT91_SAMA5D2_IER_PEN | AT91_SAMA5D2_IER_NOPEN);
> at91_adc_writel(st, TSMR, 0);
>
> - pm_runtime_mark_last_busy(st->dev);
> pm_runtime_put_autosuspend(st->dev);
> return 0;
> }
> @@ -1143,7 +1141,6 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
> at91_adc_configure_trigger_registers(st, state);
>
> if (!state) {
> - pm_runtime_mark_last_busy(st->dev);
Getting familiar. I'll not comment on other cases but {} should go here.
> pm_runtime_put_autosuspend(st->dev);
> }
Please fix all those up and post a v2 series for IIO.
I'd guess similar are present in other subsystems though so may well
need a v2 as well with the excess brackets dropped.
Jonathan
More information about the linux-arm-kernel
mailing list