* [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
@ 2016-10-15 18:04 Matt Ranostay
2016-10-16 13:41 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2016-10-15 18:04 UTC (permalink / raw)
To: linux-iio; +Cc: Matt Ranostay
Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
since the device should be put to sleep
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
---
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
index 3141c3c161bb..1fa9eefa0982 100644
--- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
+++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
@@ -301,8 +301,6 @@ static int lidar_probe(struct i2c_client *client,
if (ret)
goto error_unreg_buffer;
pm_runtime_enable(&client->dev);
-
- pm_runtime_mark_last_busy(&client->dev);
pm_runtime_idle(&client->dev);
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
2016-10-15 18:04 [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management Matt Ranostay
@ 2016-10-16 13:41 ` Jonathan Cameron
2016-10-16 17:52 ` Matt Ranostay
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2016-10-16 13:41 UTC (permalink / raw)
To: Matt Ranostay, linux-iio; +Cc: Matt Ranostay
On 15/10/16 19:04, Matt Ranostay wrote:
> Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
> since the device should be put to sleep
>
> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Hi Matt,
I don't really follow what you are addressing here.
Is the point that without this call it will suspend immediately?
I could figure this out from the pm docs based on a quick skim
read.
Or is it simply that the pm_runtime_idle call following it
will suspend immediately whatever this value contains?
Jonathan
> ---
> drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> index 3141c3c161bb..1fa9eefa0982 100644
> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> @@ -301,8 +301,6 @@ static int lidar_probe(struct i2c_client *client,
> if (ret)
> goto error_unreg_buffer;
> pm_runtime_enable(&client->dev);
> -
> - pm_runtime_mark_last_busy(&client->dev);
> pm_runtime_idle(&client->dev);
>
> return 0;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
2016-10-16 13:41 ` Jonathan Cameron
@ 2016-10-16 17:52 ` Matt Ranostay
2016-10-22 18:44 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2016-10-16 17:52 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Matt Ranostay, linux-iio
On Sun, Oct 16, 2016 at 6:41 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> On 15/10/16 19:04, Matt Ranostay wrote:
>> Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
>> since the device should be put to sleep
>>
>> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
> Hi Matt,
>
> I don't really follow what you are addressing here.
> Is the point that without this call it will suspend immediately?
> I could figure this out from the pm docs based on a quick skim
> read.
>
> Or is it simply that the pm_runtime_idle call following it
> will suspend immediately whatever this value contains?
Basically it going to be suspended once pm_runtime_idle() is called,
and setting the last busy is useless and not needed.
Clearly this doesn't affect the device running but just makes the code
more consistent with other uses.
>
>
> Jonathan
>> ---
>> drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> index 3141c3c161bb..1fa9eefa0982 100644
>> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>> @@ -301,8 +301,6 @@ static int lidar_probe(struct i2c_client *client,
>> if (ret)
>> goto error_unreg_buffer;
>> pm_runtime_enable(&client->dev);
>> -
>> - pm_runtime_mark_last_busy(&client->dev);
>> pm_runtime_idle(&client->dev);
>>
>> return 0;
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management
2016-10-16 17:52 ` Matt Ranostay
@ 2016-10-22 18:44 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2016-10-22 18:44 UTC (permalink / raw)
To: Matt Ranostay; +Cc: Matt Ranostay, linux-iio
On 16/10/16 18:52, Matt Ranostay wrote:
> On Sun, Oct 16, 2016 at 6:41 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>> On 15/10/16 19:04, Matt Ranostay wrote:
>>> Remove pm_runtime_mark_last_busy() call that wasn't need in the probe
>>> since the device should be put to sleep
>>>
>>> Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
>> Hi Matt,
>>
>> I don't really follow what you are addressing here.
>> Is the point that without this call it will suspend immediately?
>> I could figure this out from the pm docs based on a quick skim
>> read.
>>
>> Or is it simply that the pm_runtime_idle call following it
>> will suspend immediately whatever this value contains?
>
> Basically it going to be suspended once pm_runtime_idle() is called,
> and setting the last busy is useless and not needed.
> Clearly this doesn't affect the device running but just makes the code
> more consistent with other uses.
I added a quote of this to the patch description and applied.
Thanks,
Jonathan
>
>>
>>
>> Jonathan
>>> ---
>>> drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 2 --
>>> 1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>>> index 3141c3c161bb..1fa9eefa0982 100644
>>> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>>> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
>>> @@ -301,8 +301,6 @@ static int lidar_probe(struct i2c_client *client,
>>> if (ret)
>>> goto error_unreg_buffer;
>>> pm_runtime_enable(&client->dev);
>>> -
>>> - pm_runtime_mark_last_busy(&client->dev);
>>> pm_runtime_idle(&client->dev);
>>>
>>> return 0;
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-22 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 18:04 [PATCH] iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management Matt Ranostay
2016-10-16 13:41 ` Jonathan Cameron
2016-10-16 17:52 ` Matt Ranostay
2016-10-22 18:44 ` Jonathan Cameron
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).