linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Waqar Hameed" <waqar.hameed@axis.com>,
	"Julien Stephan" <jstephan@baylibre.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Bo Liu" <liubo03@inspur.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Sean Nyekjaer" <sean@geanix.com>,
	"Marcelo Schmitt" <marcelo.schmitt1@gmail.com>,
	"Rayyan Ansari" <rayyan@ansari.sh>,
	"Francisco Henriques" <franciscolealhenriques@usp.br>,
	"Matti Vaittinen" <mazziesaccount@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
Date: Fri, 4 Jul 2025 10:05:08 +0100	[thread overview]
Message-ID: <20250704100508.00003d3a@huawei.com> (raw)
In-Reply-To: <20250704075418.3218938-1-sakari.ailus@linux.intel.com>

On Fri,  4 Jul 2025 10:54:18 +0300
Sakari Ailus <sakari.ailus@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@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/accel/bmc150-accel-core.c | 1 -
>  drivers/iio/accel/bmi088-accel-core.c | 3 ---
>  drivers/iio/accel/fxls8962af-core.c   | 1 -
>  drivers/iio/accel/kxcjk-1013.c        | 1 -
>  drivers/iio/accel/kxsd9.c             | 3 ---
>  drivers/iio/accel/mma8452.c           | 1 -
>  drivers/iio/accel/mma9551_core.c      | 1 -
>  drivers/iio/accel/msa311.c            | 6 ------
>  8 files changed, 17 deletions(-)
> 
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index be5fbb0c5d29..f45beae83f8b 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -335,7 +335,6 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
>  	if (on) {
>  		ret = pm_runtime_resume_and_get(dev);
>  	} else {
> -		pm_runtime_mark_last_busy(dev);
>  		ret = pm_runtime_put_autosuspend(dev);
>  	}

See kernel coding style.  The drop to one line in each leg means we should drop the {}


> diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> index 12598feaa693..8afd151c03ad 100644
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -222,7 +222,6 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
>  	struct device *dev = regmap_get_device(data->regmap);
>  	int ret;
>  
> -	pm_runtime_mark_last_busy(dev);
>  	ret = pm_runtime_put_autosuspend(dev);
>  	if (ret)
>  		dev_err(dev, "failed to power off\n");
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index 6aefe8221296..44d770729186 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -637,7 +637,6 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
>  	if (on)
>  		ret = pm_runtime_resume_and_get(&data->client->dev);
>  	else {
> -		pm_runtime_mark_last_busy(&data->client->dev);

Likewise here.

>  		ret = pm_runtime_put_autosuspend(&data->client->dev);
>  	}
>  	if (ret < 0) {


> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index aba444a980d9..5863478bab62 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -227,7 +227,6 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
>  	if (on) {
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	} else {
> -		pm_runtime_mark_last_busy(&client->dev);

And here.

>  		ret = pm_runtime_put_autosuspend(&client->dev);
>  	}
>  
> diff --git a/drivers/iio/accel/mma9551_core.c b/drivers/iio/accel/mma9551_core.c
> index 3e7d9b79ed0e..22768f43fd24 100644
> --- a/drivers/iio/accel/mma9551_core.c
> +++ b/drivers/iio/accel/mma9551_core.c
> @@ -672,7 +672,6 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
>  	if (on)
>  		ret = pm_runtime_resume_and_get(&client->dev);
>  	else {
> -		pm_runtime_mark_last_busy(&client->dev);
And here...

>  		ret = pm_runtime_put_autosuspend(&client->dev);
>  	}



  reply	other threads:[~2025-07-04  9:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250704075225.3212486-1-sakari.ailus@linux.intel.com>
2025-07-04  7:54 ` [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls Sakari Ailus
2025-07-04  9:05   ` Jonathan Cameron [this message]
2025-07-10  6:46   ` Matti Vaittinen
2025-07-13 13:43     ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 28/80] iio: adc: " Sakari Ailus
2025-07-04  8:42   ` Linus Walleij
2025-07-04  9:09   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 29/80] iio: chemical: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 30/80] iio: common: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 32/80] iio: gyro: " Sakari Ailus
2025-07-04  8:41   ` Linus Walleij
2025-07-04 15:25   ` Rui Miguel Silva
2025-07-04  7:54 ` [PATCH 31/80] iio: dac: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 33/80] iio: imu: " Sakari Ailus
2025-07-04 10:26   ` Waqar Hameed
2025-07-04  7:54 ` [PATCH 34/80] iio: light: " Sakari Ailus
2025-07-04  8:42   ` Linus Walleij
2025-07-06 10:31   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 35/80] iio: magnetometer: " Sakari Ailus
2025-07-04  8:43   ` Linus Walleij
2025-07-06 10:28   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 36/80] iio: pressure: " Sakari Ailus
2025-07-04  7:54 ` [PATCH 37/80] iio: proximity: " Sakari Ailus
2025-07-06 10:27   ` Jonathan Cameron
2025-07-04  7:54 ` [PATCH 38/80] iio: temperature: " Sakari Ailus
2025-07-04 16:00   ` Crt Mori
2025-07-06 10:25     ` Jonathan Cameron
2025-07-06 10:26       ` Jonathan Cameron
2025-07-08 10:52         ` Sakari Ailus
2025-07-04  9:03 ` [PATCH 00/80] treewide: " Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250704100508.00003d3a@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=franciscolealhenriques@usp.br \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=jstephan@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubo03@inspur.com \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=peterz@infradead.org \
    --cc=rayyan@ansari.sh \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sean@geanix.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=waqar.hameed@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).