linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling
@ 2020-07-01 14:55 Fabrice Gasnier
  2020-09-16 10:28 ` Fabrice Gasnier
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Gasnier @ 2020-07-01 14:55 UTC (permalink / raw)
  To: jic23, rafael.j.wysocki
  Cc: rjw, ulf.hansson, linux-arm-kernel, linux-kernel,
	mcoquelin.stm32, alexandre.torgue, fabrice.gasnier,
	olivier.moysan, linux-iio, linux-stm32

When the ADC is runtime suspended and starting a conversion, the stm32-adc
driver calls pm_runtime_get_sync() that gets cascaded to the parent
(e.g. runtime resume of stm32-adc-core driver). This also kicks the
autosuspend delay (e.g. 2s) of the parent.
Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
capture) won't kick the autosuspend delay for the parent (stm32-adc-core
driver) as already active.

Currently, this makes the stm32-adc-core driver go in suspend state
every 2s when doing slow polling. As an example, doing a capture, e.g.
cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
isn't refreshed. Once it expires, the parent immediately falls into
runtime suspended state, in between two captures, as soon as the child
driver falls into runtime suspend state:
- e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
  autosuspend delay of the child.
- stm32-adc-core switches off regulators, clocks and so on.
- They get switched on back again 100ms later in this example (at 2.2s).

So, use runtime_idle() callback in stm32-adc-core driver to call
pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
to avoid this.

Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
Changes in v2:
- Use runtime_idle callback in stm32-adc-core driver, instead of refreshing
  last_busy from the child (for the parent) at many place. Initial patch v1
  looked like "somewhat adhoc solution" as commented by Jonathan.
---
 drivers/iio/adc/stm32-adc-core.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index 0e2068e..3586369 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -794,6 +794,13 @@ static int stm32_adc_core_runtime_resume(struct device *dev)
 {
 	return stm32_adc_core_hw_start(dev);
 }
+
+static int stm32_adc_core_runtime_idle(struct device *dev)
+{
+	pm_runtime_mark_last_busy(dev);
+
+	return 0;
+}
 #endif
 
 static const struct dev_pm_ops stm32_adc_core_pm_ops = {
@@ -801,7 +808,7 @@ static const struct dev_pm_ops stm32_adc_core_pm_ops = {
 				pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(stm32_adc_core_runtime_suspend,
 			   stm32_adc_core_runtime_resume,
-			   NULL)
+			   stm32_adc_core_runtime_idle)
 };
 
 static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling
  2020-07-01 14:55 [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling Fabrice Gasnier
@ 2020-09-16 10:28 ` Fabrice Gasnier
  2020-09-26 15:17   ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Gasnier @ 2020-09-16 10:28 UTC (permalink / raw)
  To: jic23, rafael.j.wysocki
  Cc: rjw, ulf.hansson, linux-arm-kernel, linux-kernel,
	mcoquelin.stm32, alexandre.torgue, olivier.moysan, linux-iio,
	linux-stm32

On 7/1/20 4:55 PM, Fabrice Gasnier wrote:
> When the ADC is runtime suspended and starting a conversion, the stm32-adc
> driver calls pm_runtime_get_sync() that gets cascaded to the parent
> (e.g. runtime resume of stm32-adc-core driver). This also kicks the
> autosuspend delay (e.g. 2s) of the parent.
> Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
> capture) won't kick the autosuspend delay for the parent (stm32-adc-core
> driver) as already active.
> 
> Currently, this makes the stm32-adc-core driver go in suspend state
> every 2s when doing slow polling. As an example, doing a capture, e.g.
> cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
> isn't refreshed. Once it expires, the parent immediately falls into
> runtime suspended state, in between two captures, as soon as the child
> driver falls into runtime suspend state:
> - e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
>   autosuspend delay of the child.
> - stm32-adc-core switches off regulators, clocks and so on.
> - They get switched on back again 100ms later in this example (at 2.2s).
> 
> So, use runtime_idle() callback in stm32-adc-core driver to call
> pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
> to avoid this.
> 
> Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
> Changes in v2:
> - Use runtime_idle callback in stm32-adc-core driver, instead of refreshing
>   last_busy from the child (for the parent) at many place. Initial patch v1
>   looked like "somewhat adhoc solution" as commented by Jonathan.

Hi all,

Gentle reminder for this patch. Earlier discussions on it were as per
[1] and [2].

Ideally, Jonathan was looking for an ack from Rafael on this patch.
This is a long pending issue. I'd like to progress on this.

[1] https://patchwork.kernel.org/patch/11349841/
[2] https://lkml.org/lkml/2020/6/11/279

Please advise,
Thanks in advance,
Fabrice

> ---
>  drivers/iio/adc/stm32-adc-core.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> index 0e2068e..3586369 100644
> --- a/drivers/iio/adc/stm32-adc-core.c
> +++ b/drivers/iio/adc/stm32-adc-core.c
> @@ -794,6 +794,13 @@ static int stm32_adc_core_runtime_resume(struct device *dev)
>  {
>  	return stm32_adc_core_hw_start(dev);
>  }
> +
> +static int stm32_adc_core_runtime_idle(struct device *dev)
> +{
> +	pm_runtime_mark_last_busy(dev);
> +
> +	return 0;
> +}
>  #endif
>  
>  static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> @@ -801,7 +808,7 @@ static const struct dev_pm_ops stm32_adc_core_pm_ops = {
>  				pm_runtime_force_resume)
>  	SET_RUNTIME_PM_OPS(stm32_adc_core_runtime_suspend,
>  			   stm32_adc_core_runtime_resume,
> -			   NULL)
> +			   stm32_adc_core_runtime_idle)
>  };
>  
>  static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = {
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling
  2020-09-16 10:28 ` Fabrice Gasnier
@ 2020-09-26 15:17   ` Jonathan Cameron
  2020-09-28 11:23     ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2020-09-26 15:17 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: rafael.j.wysocki, rjw, ulf.hansson, linux-arm-kernel,
	linux-kernel, mcoquelin.stm32, alexandre.torgue, olivier.moysan,
	linux-iio, linux-stm32

On Wed, 16 Sep 2020 12:28:00 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:

> On 7/1/20 4:55 PM, Fabrice Gasnier wrote:
> > When the ADC is runtime suspended and starting a conversion, the stm32-adc
> > driver calls pm_runtime_get_sync() that gets cascaded to the parent
> > (e.g. runtime resume of stm32-adc-core driver). This also kicks the
> > autosuspend delay (e.g. 2s) of the parent.
> > Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
> > capture) won't kick the autosuspend delay for the parent (stm32-adc-core
> > driver) as already active.
> > 
> > Currently, this makes the stm32-adc-core driver go in suspend state
> > every 2s when doing slow polling. As an example, doing a capture, e.g.
> > cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
> > isn't refreshed. Once it expires, the parent immediately falls into
> > runtime suspended state, in between two captures, as soon as the child
> > driver falls into runtime suspend state:
> > - e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
> >   autosuspend delay of the child.
> > - stm32-adc-core switches off regulators, clocks and so on.
> > - They get switched on back again 100ms later in this example (at 2.2s).
> > 
> > So, use runtime_idle() callback in stm32-adc-core driver to call
> > pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
> > to avoid this.
> > 
> > Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")
> > 
> > Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> > ---
> > Changes in v2:
> > - Use runtime_idle callback in stm32-adc-core driver, instead of refreshing
> >   last_busy from the child (for the parent) at many place. Initial patch v1
> >   looked like "somewhat adhoc solution" as commented by Jonathan.  
> 
> Hi all,
> 
> Gentle reminder for this patch. Earlier discussions on it were as per
> [1] and [2].
> 
> Ideally, Jonathan was looking for an ack from Rafael on this patch.
> This is a long pending issue. I'd like to progress on this.
> 
> [1] https://patchwork.kernel.org/patch/11349841/
> [2] https://lkml.org/lkml/2020/6/11/279

Fabrice, I think this one has sat waiting for inputs for
too long. Hence I'm going to take a slight gamble that you are correct
on doing the fix this way (I'm reasonably convinced)

Applied to the fixes-togreg branch of iio.git.
It won't go in for 5.9 now, so we have a bit of time for any last
minute comments.

Thanks,

Jonathan

> 
> Please advise,
> Thanks in advance,
> Fabrice
> 
> > ---
> >  drivers/iio/adc/stm32-adc-core.c | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> > index 0e2068e..3586369 100644
> > --- a/drivers/iio/adc/stm32-adc-core.c
> > +++ b/drivers/iio/adc/stm32-adc-core.c
> > @@ -794,6 +794,13 @@ static int stm32_adc_core_runtime_resume(struct device *dev)
> >  {
> >  	return stm32_adc_core_hw_start(dev);
> >  }
> > +
> > +static int stm32_adc_core_runtime_idle(struct device *dev)
> > +{
> > +	pm_runtime_mark_last_busy(dev);
> > +
> > +	return 0;
> > +}
> >  #endif
> >  
> >  static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> > @@ -801,7 +808,7 @@ static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> >  				pm_runtime_force_resume)
> >  	SET_RUNTIME_PM_OPS(stm32_adc_core_runtime_suspend,
> >  			   stm32_adc_core_runtime_resume,
> > -			   NULL)
> > +			   stm32_adc_core_runtime_idle)
> >  };
> >  
> >  static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = {
> >   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling
  2020-09-26 15:17   ` Jonathan Cameron
@ 2020-09-28 11:23     ` Ulf Hansson
  2020-09-29 15:17       ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2020-09-28 11:23 UTC (permalink / raw)
  To: Jonathan Cameron, Fabrice Gasnier
  Cc: Rafael J. Wysocki, Rafael J. Wysocki, Linux ARM,
	Linux Kernel Mailing List, Maxime Coquelin, Alexandre Torgue,
	olivier.moysan, linux-iio, linux-stm32

Jonathan, Fabrice,

On Sat, 26 Sep 2020 at 17:17, Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Wed, 16 Sep 2020 12:28:00 +0200
> Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
>
> > On 7/1/20 4:55 PM, Fabrice Gasnier wrote:
> > > When the ADC is runtime suspended and starting a conversion, the stm32-adc
> > > driver calls pm_runtime_get_sync() that gets cascaded to the parent
> > > (e.g. runtime resume of stm32-adc-core driver). This also kicks the
> > > autosuspend delay (e.g. 2s) of the parent.
> > > Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
> > > capture) won't kick the autosuspend delay for the parent (stm32-adc-core
> > > driver) as already active.
> > >
> > > Currently, this makes the stm32-adc-core driver go in suspend state
> > > every 2s when doing slow polling. As an example, doing a capture, e.g.
> > > cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
> > > isn't refreshed. Once it expires, the parent immediately falls into
> > > runtime suspended state, in between two captures, as soon as the child
> > > driver falls into runtime suspend state:
> > > - e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
> > >   autosuspend delay of the child.
> > > - stm32-adc-core switches off regulators, clocks and so on.
> > > - They get switched on back again 100ms later in this example (at 2.2s).
> > >
> > > So, use runtime_idle() callback in stm32-adc-core driver to call
> > > pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
> > > to avoid this.
> > >
> > > Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")
> > >
> > > Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> > > ---
> > > Changes in v2:
> > > - Use runtime_idle callback in stm32-adc-core driver, instead of refreshing
> > >   last_busy from the child (for the parent) at many place. Initial patch v1
> > >   looked like "somewhat adhoc solution" as commented by Jonathan.
> >
> > Hi all,
> >
> > Gentle reminder for this patch. Earlier discussions on it were as per
> > [1] and [2].
> >
> > Ideally, Jonathan was looking for an ack from Rafael on this patch.
> > This is a long pending issue. I'd like to progress on this.
> >
> > [1] https://patchwork.kernel.org/patch/11349841/
> > [2] https://lkml.org/lkml/2020/6/11/279
>
> Fabrice, I think this one has sat waiting for inputs for
> too long. Hence I'm going to take a slight gamble that you are correct
> on doing the fix this way (I'm reasonably convinced)

My apologies for the huge and unacceptable delay. I have re-started
looking at this several times, but just never got the point of writing
a proper reply. Let me do this now, better late than never I guess.

In general, I think this problem (nicely described by Fabrice), should
be solved in the runtime PM core, without having to involve drivers
for parents/childs. I have looked into that, but I don't have a patch
to propose, at least not yet.

FYI, I have also stumbled over the same problem, for a card controller
(parent), serving both sd and memstick cards. For that case, we simply
decided to skip using autosuspend for the child devices (represented
by an sd host and a memstick host), not optimal, but there were other
reasons why we decided for this approach as well.

That said, I also think the solution proposed in $subject patch, which
uses the ->runtime_idle() callback for the parent is perfectly fine,
at least until we have figured out something that can replace it.

>
> Applied to the fixes-togreg branch of iio.git.
> It won't go in for 5.9 now, so we have a bit of time for any last
> minute comments.

Feel free to add:

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

>
> Thanks,
>
> Jonathan
>
> >
> > Please advise,
> > Thanks in advance,
> > Fabrice
> >
> > > ---
> > >  drivers/iio/adc/stm32-adc-core.c | 9 ++++++++-
> > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> > > index 0e2068e..3586369 100644
> > > --- a/drivers/iio/adc/stm32-adc-core.c
> > > +++ b/drivers/iio/adc/stm32-adc-core.c
> > > @@ -794,6 +794,13 @@ static int stm32_adc_core_runtime_resume(struct device *dev)
> > >  {
> > >     return stm32_adc_core_hw_start(dev);
> > >  }
> > > +
> > > +static int stm32_adc_core_runtime_idle(struct device *dev)
> > > +{
> > > +   pm_runtime_mark_last_busy(dev);
> > > +
> > > +   return 0;
> > > +}
> > >  #endif
> > >
> > >  static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> > > @@ -801,7 +808,7 @@ static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> > >                             pm_runtime_force_resume)
> > >     SET_RUNTIME_PM_OPS(stm32_adc_core_runtime_suspend,
> > >                        stm32_adc_core_runtime_resume,
> > > -                      NULL)
> > > +                      stm32_adc_core_runtime_idle)
> > >  };
> > >
> > >  static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = {
> > >
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling
  2020-09-28 11:23     ` Ulf Hansson
@ 2020-09-29 15:17       ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2020-09-29 15:17 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Fabrice Gasnier, Rafael J. Wysocki, Rafael J. Wysocki, Linux ARM,
	Linux Kernel Mailing List, Maxime Coquelin, Alexandre Torgue,
	olivier.moysan, linux-iio, linux-stm32

On Mon, 28 Sep 2020 13:23:11 +0200
Ulf Hansson <ulf.hansson@linaro.org> wrote:

> Jonathan, Fabrice,
> 
> On Sat, 26 Sep 2020 at 17:17, Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Wed, 16 Sep 2020 12:28:00 +0200
> > Fabrice Gasnier <fabrice.gasnier@st.com> wrote:
> >  
> > > On 7/1/20 4:55 PM, Fabrice Gasnier wrote:  
> > > > When the ADC is runtime suspended and starting a conversion, the stm32-adc
> > > > driver calls pm_runtime_get_sync() that gets cascaded to the parent
> > > > (e.g. runtime resume of stm32-adc-core driver). This also kicks the
> > > > autosuspend delay (e.g. 2s) of the parent.
> > > > Once the ADC is active, calling pm_runtime_get_sync() again (upon a new
> > > > capture) won't kick the autosuspend delay for the parent (stm32-adc-core
> > > > driver) as already active.
> > > >
> > > > Currently, this makes the stm32-adc-core driver go in suspend state
> > > > every 2s when doing slow polling. As an example, doing a capture, e.g.
> > > > cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent
> > > > isn't refreshed. Once it expires, the parent immediately falls into
> > > > runtime suspended state, in between two captures, as soon as the child
> > > > driver falls into runtime suspend state:
> > > > - e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms
> > > >   autosuspend delay of the child.
> > > > - stm32-adc-core switches off regulators, clocks and so on.
> > > > - They get switched on back again 100ms later in this example (at 2.2s).
> > > >
> > > > So, use runtime_idle() callback in stm32-adc-core driver to call
> > > > pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core),
> > > > to avoid this.
> > > >
> > > > Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support")
> > > >
> > > > Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> > > > ---
> > > > Changes in v2:
> > > > - Use runtime_idle callback in stm32-adc-core driver, instead of refreshing
> > > >   last_busy from the child (for the parent) at many place. Initial patch v1
> > > >   looked like "somewhat adhoc solution" as commented by Jonathan.  
> > >
> > > Hi all,
> > >
> > > Gentle reminder for this patch. Earlier discussions on it were as per
> > > [1] and [2].
> > >
> > > Ideally, Jonathan was looking for an ack from Rafael on this patch.
> > > This is a long pending issue. I'd like to progress on this.
> > >
> > > [1] https://patchwork.kernel.org/patch/11349841/
> > > [2] https://lkml.org/lkml/2020/6/11/279  
> >
> > Fabrice, I think this one has sat waiting for inputs for
> > too long. Hence I'm going to take a slight gamble that you are correct
> > on doing the fix this way (I'm reasonably convinced)  
> 
> My apologies for the huge and unacceptable delay. I have re-started
> looking at this several times, but just never got the point of writing
> a proper reply. Let me do this now, better late than never I guess.
> 
> In general, I think this problem (nicely described by Fabrice), should
> be solved in the runtime PM core, without having to involve drivers
> for parents/childs. I have looked into that, but I don't have a patch
> to propose, at least not yet.
> 
> FYI, I have also stumbled over the same problem, for a card controller
> (parent), serving both sd and memstick cards. For that case, we simply
> decided to skip using autosuspend for the child devices (represented
> by an sd host and a memstick host), not optimal, but there were other
> reasons why we decided for this approach as well.
> 
> That said, I also think the solution proposed in $subject patch, which
> uses the ->runtime_idle() callback for the parent is perfectly fine,
> at least until we have figured out something that can replace it.
> 
> >
> > Applied to the fixes-togreg branch of iio.git.
> > It won't go in for 5.9 now, so we have a bit of time for any last
> > minute comments.  
> 
> Feel free to add:
> 
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Thanks and added.

Jonathan

> 
> Kind regards
> Uffe
> 
> >
> > Thanks,
> >
> > Jonathan
> >  
> > >
> > > Please advise,
> > > Thanks in advance,
> > > Fabrice
> > >  
> > > > ---
> > > >  drivers/iio/adc/stm32-adc-core.c | 9 ++++++++-
> > > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> > > > index 0e2068e..3586369 100644
> > > > --- a/drivers/iio/adc/stm32-adc-core.c
> > > > +++ b/drivers/iio/adc/stm32-adc-core.c
> > > > @@ -794,6 +794,13 @@ static int stm32_adc_core_runtime_resume(struct device *dev)
> > > >  {
> > > >     return stm32_adc_core_hw_start(dev);
> > > >  }
> > > > +
> > > > +static int stm32_adc_core_runtime_idle(struct device *dev)
> > > > +{
> > > > +   pm_runtime_mark_last_busy(dev);
> > > > +
> > > > +   return 0;
> > > > +}
> > > >  #endif
> > > >
> > > >  static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> > > > @@ -801,7 +808,7 @@ static const struct dev_pm_ops stm32_adc_core_pm_ops = {
> > > >                             pm_runtime_force_resume)
> > > >     SET_RUNTIME_PM_OPS(stm32_adc_core_runtime_suspend,
> > > >                        stm32_adc_core_runtime_resume,
> > > > -                      NULL)
> > > > +                      stm32_adc_core_runtime_idle)
> > > >  };
> > > >
> > > >  static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = {
> > > >  
> >  


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-29 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 14:55 [RESEND PATCH v2] iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling Fabrice Gasnier
2020-09-16 10:28 ` Fabrice Gasnier
2020-09-26 15:17   ` Jonathan Cameron
2020-09-28 11:23     ` Ulf Hansson
2020-09-29 15:17       ` 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).