[PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

Sakari Ailus posted 80 patches 3 months ago
[PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
Posted by Sakari Ailus 3 months ago
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);
 	}
 
diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index dea126f993c1..c7da90af0d2d 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -375,7 +375,6 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
 	return -EINVAL;
 
 out_read_raw_pm_put:
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return ret;
@@ -419,7 +418,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 			return ret;
 
 		ret = bmi088_accel_set_scale(data, val, val2);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 		return ret;
 	case IIO_CHAN_INFO_SAMP_FREQ:
@@ -428,7 +426,6 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 			return ret;
 
 		ret = bmi088_accel_set_sample_freq(data, val);
-		pm_runtime_mark_last_busy(dev);
 		pm_runtime_put_autosuspend(dev);
 		return ret;
 	default:
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);
 		ret = pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index cfc31265cdd0..4717d80fc24a 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -151,7 +151,6 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
 		ret = kxsd9_write_scale(indio_dev, val2);
 	}
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
@@ -199,7 +198,6 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 	}
 
 error_ret:
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
@@ -250,7 +248,6 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 {
 	struct kxsd9_state *st = iio_priv(indio_dev);
 
-	pm_runtime_mark_last_busy(st->dev);
 	pm_runtime_put_autosuspend(st->dev);
 
 	return 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);
 		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);
 		ret = pm_runtime_put_autosuspend(&client->dev);
 	}
 
diff --git a/drivers/iio/accel/msa311.c b/drivers/iio/accel/msa311.c
index 3e10225410e8..ec70a517c0a9 100644
--- a/drivers/iio/accel/msa311.c
+++ b/drivers/iio/accel/msa311.c
@@ -607,7 +607,6 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
 	err = msa311_get_axis(msa311, chan, &axis);
 	mutex_unlock(&msa311->lock);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	iio_device_release_direct(indio_dev);
@@ -741,7 +740,6 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
 			break;
 		}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (err)
@@ -781,7 +779,6 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
 			break;
 		}
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	iio_device_release_direct(indio_dev);
@@ -832,7 +829,6 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 
 	mutex_unlock(&msa311->lock);
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	if (err)
@@ -855,7 +851,6 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
 	struct msa311_priv *msa311 = iio_priv(indio_dev);
 	struct device *dev = msa311->dev;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	return 0;
@@ -1231,7 +1226,6 @@ static int msa311_probe(struct i2c_client *i2c)
 	if (err)
 		return err;
 
-	pm_runtime_mark_last_busy(dev);
 	pm_runtime_put_autosuspend(dev);
 
 	err = devm_iio_device_register(dev, indio_dev);
-- 
2.39.5
Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
Posted by Matti Vaittinen 2 months, 4 weeks ago
On 04/07/2025 10:54, Sakari Ailus 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>
> ---

Looks good to me. Just one comment (to 4 drivers) - but I'm not 
insisting it to be addressed :)

> 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);
>   	}
>   

// snip

> 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);
>   		ret = pm_runtime_put_autosuspend(&data->client->dev);
>   	}
>   	if (ret < 0) {

//snip

> 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);
>   		ret = pm_runtime_put_autosuspend(&client->dev);
>   	}

//snip

>   
> 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);
>   		ret = pm_runtime_put_autosuspend(&client->dev);
>   	}
>   

Do these really warrant a function? (Especially for the mma9551 where 
the function is exported). I think it'd be fine to have the 
pm_runtime_resume_and_get() and the pm_runtime_put_autosuspend() called 
directly without these wrappers.

Anyways, this looks good to me - thanks!

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

Yours
	-- Matti
Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
Posted by Jonathan Cameron 2 months, 3 weeks ago
On Thu, 10 Jul 2025 09:46:12 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:

> On 04/07/2025 10:54, Sakari Ailus 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>
> > ---  
> 
> Looks good to me. Just one comment (to 4 drivers) - but I'm not 
> insisting it to be addressed :)
> 
> > 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);
> >   	}
> >     
> 
> // snip
> 
> > 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);
> >   		ret = pm_runtime_put_autosuspend(&data->client->dev);
> >   	}
> >   	if (ret < 0) {  
> 
> //snip
> 
> > 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);
> >   		ret = pm_runtime_put_autosuspend(&client->dev);
> >   	}  
> 
> //snip
> 
> >   
> > 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);
> >   		ret = pm_runtime_put_autosuspend(&client->dev);
> >   	}
> >     
> 
> Do these really warrant a function? (Especially for the mma9551 where 
> the function is exported). I think it'd be fine to have the 
> pm_runtime_resume_and_get() and the pm_runtime_put_autosuspend() called 
> directly without these wrappers.

Absolutely agree that they don't.  However, I think it may make
sense to clean that up in two jumps.   This series just makes the
specific drop of the unnecessary call, next series does the refactor.
That keeps this series tightly focused on one topic.

Jonathan

> 
> Anyways, this looks good to me - thanks!
> 
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> 
> Yours
> 	-- Matti
> 
> 
>
Re: [PATCH 27/80] iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
Posted by Jonathan Cameron 3 months ago
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);
>  	}