* [PATCH] iio: light: apds9960: correct ->last_busy count
@ 2015-11-08 4:21 Matt Ranostay
2015-11-08 15:13 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2015-11-08 4:21 UTC (permalink / raw)
To: jic23; +Cc: linux-iio, Matt Ranostay
Add missing pm_runtime_mark_last_busy to apds9960_set_power_state
function.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
drivers/iio/light/apds9960.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
index 7d269ef..f6a07dc 100644
--- a/drivers/iio/light/apds9960.c
+++ b/drivers/iio/light/apds9960.c
@@ -453,6 +453,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
usleep_range(data->als_adc_int_us,
APDS9960_MAX_INT_TIME_IN_US);
} else {
+ pm_runtime_mark_last_busy(dev);
ret = pm_runtime_put_autosuspend(dev);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] iio: light: apds9960: correct ->last_busy count
2015-11-08 4:21 [PATCH] iio: light: apds9960: correct ->last_busy count Matt Ranostay
@ 2015-11-08 15:13 ` Jonathan Cameron
2015-11-08 21:23 ` Matt Ranostay
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2015-11-08 15:13 UTC (permalink / raw)
To: Matt Ranostay; +Cc: linux-iio
On 08/11/15 04:21, Matt Ranostay wrote:
> Add missing pm_runtime_mark_last_busy to apds9960_set_power_state
> function.
>
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Hi Matt,
Could you elaborate on what the result of this not being there is?
My first thought is that this probably wants to go as a fix, but for
that I need details of what the effects of the 'bug' are.
Jonathan
> ---
> drivers/iio/light/apds9960.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
> index 7d269ef..f6a07dc 100644
> --- a/drivers/iio/light/apds9960.c
> +++ b/drivers/iio/light/apds9960.c
> @@ -453,6 +453,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
> usleep_range(data->als_adc_int_us,
> APDS9960_MAX_INT_TIME_IN_US);
> } else {
> + pm_runtime_mark_last_busy(dev);
> ret = pm_runtime_put_autosuspend(dev);
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] iio: light: apds9960: correct ->last_busy count
2015-11-08 15:13 ` Jonathan Cameron
@ 2015-11-08 21:23 ` Matt Ranostay
2015-11-15 11:19 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2015-11-08 21:23 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio@vger.kernel.org
On Sun, Nov 8, 2015 at 7:13 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> On 08/11/15 04:21, Matt Ranostay wrote:
>> Add missing pm_runtime_mark_last_busy to apds9960_set_power_state
>> function.
>>
>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
> Hi Matt,
>
> Could you elaborate on what the result of this not being there is?
> My first thought is that this probably wants to go as a fix, but for
> that I need details of what the effects of the 'bug' are.
Unless pm_runtime_mark_last_busy is called the
pm_runtime_put_autosuspend may put the device into suspend before the
delay time requested.
Thanks,
Matt
>
> Jonathan
>> ---
>> drivers/iio/light/apds9960.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
>> index 7d269ef..f6a07dc 100644
>> --- a/drivers/iio/light/apds9960.c
>> +++ b/drivers/iio/light/apds9960.c
>> @@ -453,6 +453,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
>> usleep_range(data->als_adc_int_us,
>> APDS9960_MAX_INT_TIME_IN_US);
>> } else {
>> + pm_runtime_mark_last_busy(dev);
>> ret = pm_runtime_put_autosuspend(dev);
>> }
>>
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] iio: light: apds9960: correct ->last_busy count
2015-11-08 21:23 ` Matt Ranostay
@ 2015-11-15 11:19 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2015-11-15 11:19 UTC (permalink / raw)
To: Matt Ranostay; +Cc: linux-iio@vger.kernel.org
On 08/11/15 21:23, Matt Ranostay wrote:
> On Sun, Nov 8, 2015 at 7:13 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>> On 08/11/15 04:21, Matt Ranostay wrote:
>>> Add missing pm_runtime_mark_last_busy to apds9960_set_power_state
>>> function.
>>>
>>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
>> Hi Matt,
>>
>> Could you elaborate on what the result of this not being there is?
>> My first thought is that this probably wants to go as a fix, but for
>> that I need details of what the effects of the 'bug' are.
>
> Unless pm_runtime_mark_last_busy is called the
> pm_runtime_put_autosuspend may put the device into suspend before the
> delay time requested.
Have added this text to the commit message and applied to the
temporary branch
fixes-togreg-post-rc1 which should go out in a few days.
Jonathan
>
>
> Thanks,
>
> Matt
>
>
>>
>> Jonathan
>>> ---
>>> drivers/iio/light/apds9960.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
>>> index 7d269ef..f6a07dc 100644
>>> --- a/drivers/iio/light/apds9960.c
>>> +++ b/drivers/iio/light/apds9960.c
>>> @@ -453,6 +453,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
>>> usleep_range(data->als_adc_int_us,
>>> APDS9960_MAX_INT_TIME_IN_US);
>>> } else {
>>> + pm_runtime_mark_last_busy(dev);
>>> ret = pm_runtime_put_autosuspend(dev);
>>> }
>>>
>>>
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-15 11:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08 4:21 [PATCH] iio: light: apds9960: correct ->last_busy count Matt Ranostay
2015-11-08 15:13 ` Jonathan Cameron
2015-11-08 21:23 ` Matt Ranostay
2015-11-15 11:19 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox