iio: light: apds9960: correct ->last_busy count
PATCH 1/1 iio: light: apds9960: correct ->last_busy count
Add missing pm_runtime_mark_last_busy to apds9960_set_power_state function.
--- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/light/apds9960.c +1 -0
@@ -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); }
Signature · 1 line
1.9.1
Jonathan Cameron
maintainerQuoted 4 lines · Matt Ranostay
Add missing
pm_runtime_mark_last_busytoapds9960_set_power_statefunction.Signed-off-by Matt Ranostay <[email protected]>
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
Quoted 17 lines
--- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/light/apds9960.c +1
-0@@ -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); }
Quoted 10 lines · Jonathan Cameron
Quoted 4 lines · Matt Ranostay
Add missing
pm_runtime_mark_last_busytoapds9960_set_power_statefunction.Signed-off-by Matt Ranostay <[email protected]>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
Quoted 20 lines
Jonathan
Quoted 17 lines
--- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/light/apds9960.c +1
-0@@ -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); }
Jonathan Cameron
maintainerQuoted 8 lines · Matt Ranostay
Quoted 7 lines · Jonathan Cameron
Quoted 4 lines · Matt Ranostay
Add missing
pm_runtime_mark_last_busytoapds9960_set_power_statefunction.Signed-off-by Matt Ranostay <[email protected]>Hi Matt,
Quoted 7 lines
Quoted 3 lines
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_busyis called thepm_runtime_put_autosuspendmay 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
Quoted 27 lines
Thanks,
Matt
Quoted 20 lines
Jonathan
Quoted 17 lines
--- drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/light/apds9960.c +1
-0@@ -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); }