linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ARM: imx: Set LDO regulator supply
@ 2017-04-04 17:04 Leonard Crestez
  2017-04-04 17:04 ` [PATCH v2 1/4] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Leonard Crestez
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Leonard Crestez @ 2017-04-04 17:04 UTC (permalink / raw)
  To: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo
  Cc: Leonard Crestez, Mark Brown, Robin Gong, Anson Huang,
	Irina Tirdea, Fabio Estevam, Octavian Purdila, Liam Girdwood,
	linux-pm, linux-arm-kernel, linux-kernel

Setting the LDO regulator parent is optional but beneficial. It will cause
the PMIC output voltage to be dynamically set to the minimum input for the
LDOs, this should be more efficient.

This propagation was introduced by:
commit fc42112c0eaa ("regulator: core: Propagate voltage changes to supply
regulators")

Changes since v1:
 * Drop patch 1 since it only avoids logging a warning and the gpc driver
is going through more changes.
 * Initialize cpufreq->suspend_freq based on policy->max instead.
 * Remove reference to ldo-bypass from suspend_freq patch message.

It's not clear if policy->cpuinfo.max would be preferable, at init time
they should be identical.

Link: https://lkml.org/lkml/2017/3/31/683

Irina Tirdea (1):
  cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator

Leonard Crestez (3):
  cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  ARM: dts: imx6qdl-sabresd: Set LDO regulator supply
  ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 12 ++++++++++++
 arch/arm/boot/dts/imx6qp-sabresd.dts   |  4 ++--
 drivers/cpufreq/imx6q-cpufreq.c        | 15 ++++++++++++++-
 3 files changed, 28 insertions(+), 3 deletions(-)

-- 
2.7.4

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

* [PATCH v2 1/4] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator
  2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
@ 2017-04-04 17:04 ` Leonard Crestez
  2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Leonard Crestez @ 2017-04-04 17:04 UTC (permalink / raw)
  To: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo
  Cc: Leonard Crestez, Mark Brown, Robin Gong, Anson Huang,
	Irina Tirdea, Fabio Estevam, Octavian Purdila, Liam Girdwood,
	linux-pm, linux-arm-kernel, linux-kernel

From: Irina Tirdea <irina.tirdea@nxp.com>

If there are any errors in getting the cpu0 regulators, the driver returns
-ENOENT. In case the regulators are not yet available, the devm_regulator_get
calls will return -EPROBE_DEFER, so that the driver can be probed later.
If we return -ENOENT, the driver will fail its initialization and will
not try to probe again (when the regulators become available).

Return the actual error received from regulator_get in probe. Print a
differentiated message in case we need to probe the device later and
in case we actually failed. Also add a message to inform when the
driver has been successfully registered.

Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/imx6q-cpufreq.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 7719b02..be90ee3 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -222,6 +222,13 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
 	arm_reg = regulator_get(cpu_dev, "arm");
 	pu_reg = regulator_get_optional(cpu_dev, "pu");
 	soc_reg = regulator_get(cpu_dev, "soc");
+	if (PTR_ERR(arm_reg) == -EPROBE_DEFER ||
+			PTR_ERR(soc_reg) == -EPROBE_DEFER ||
+			PTR_ERR(pu_reg) == -EPROBE_DEFER) {
+		ret = -EPROBE_DEFER;
+		dev_dbg(cpu_dev, "regulators not ready, defer\n");
+		goto put_reg;
+	}
 	if (IS_ERR(arm_reg) || IS_ERR(soc_reg)) {
 		dev_err(cpu_dev, "failed to get regulators\n");
 		ret = -ENOENT;
-- 
2.7.4

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

* [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
  2017-04-04 17:04 ` [PATCH v2 1/4] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Leonard Crestez
@ 2017-04-04 17:04 ` Leonard Crestez
  2017-04-05  8:03   ` Lucas Stach
                     ` (2 more replies)
  2017-04-04 17:04 ` [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply Leonard Crestez
                   ` (2 subsequent siblings)
  4 siblings, 3 replies; 12+ messages in thread
From: Leonard Crestez @ 2017-04-04 17:04 UTC (permalink / raw)
  To: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo
  Cc: Leonard Crestez, Mark Brown, Robin Gong, Anson Huang,
	Irina Tirdea, Fabio Estevam, Octavian Purdila, Liam Girdwood,
	linux-pm, linux-arm-kernel, linux-kernel

If the cpufreq driver tries to modify voltage/freq during suspend/resume
it might need to control an external PMIC via I2C or SPI but those
devices might be already suspended. This issue is likely to happen
whenever the LDOs have their vin-supply set.

To avoid this scenario we just increase cpufreq to the maximum before
suspend.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
 drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index be90ee3..786122e 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -161,8 +161,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
 
 static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
 {
+	int ret;
+
 	policy->clk = arm_clk;
-	return cpufreq_generic_init(policy, freq_table, transition_latency);
+	ret = cpufreq_generic_init(policy, freq_table, transition_latency);
+	policy->suspend_freq = policy->max;
+
+	return ret;
 }
 
 static struct cpufreq_driver imx6q_cpufreq_driver = {
@@ -173,6 +178,7 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
 	.init = imx6q_cpufreq_init,
 	.name = "imx6q-cpufreq",
 	.attr = cpufreq_generic_attr,
+	.suspend = cpufreq_generic_suspend,
 };
 
 static int imx6q_cpufreq_probe(struct platform_device *pdev)
-- 
2.7.4

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

* [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply
  2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
  2017-04-04 17:04 ` [PATCH v2 1/4] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Leonard Crestez
  2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
@ 2017-04-04 17:04 ` Leonard Crestez
  2017-04-07 12:20   ` Shawn Guo
  2017-04-04 17:04 ` [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm " Leonard Crestez
  2017-04-19  9:28 ` [PATCH v2 0/4] ARM: imx: Set LDO " Leonard Crestez
  4 siblings, 1 reply; 12+ messages in thread
From: Leonard Crestez @ 2017-04-04 17:04 UTC (permalink / raw)
  To: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo
  Cc: Leonard Crestez, Mark Brown, Robin Gong, Anson Huang,
	Irina Tirdea, Fabio Estevam, Octavian Purdila, Liam Girdwood,
	linux-pm, linux-arm-kernel, linux-kernel

Setting the supply is optional but beneficial, it will cause PMIC
voltages to be dynamically changed with cpu frequency.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 63bf95e..58055ce 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -548,6 +548,18 @@
 	status = "okay";
 };
 
+&reg_arm {
+       vin-supply = <&sw1a_reg>;
+};
+
+&reg_pu {
+       vin-supply = <&sw1c_reg>;
+};
+
+&reg_soc {
+       vin-supply = <&sw1c_reg>;
+};
+
 &snvs_poweroff {
 	status = "okay";
 };
-- 
2.7.4

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

* [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply
  2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
                   ` (2 preceding siblings ...)
  2017-04-04 17:04 ` [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply Leonard Crestez
@ 2017-04-04 17:04 ` Leonard Crestez
  2017-04-07 12:21   ` Shawn Guo
  2017-04-19  9:28 ` [PATCH v2 0/4] ARM: imx: Set LDO " Leonard Crestez
  4 siblings, 1 reply; 12+ messages in thread
From: Leonard Crestez @ 2017-04-04 17:04 UTC (permalink / raw)
  To: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo
  Cc: Leonard Crestez, Mark Brown, Robin Gong, Anson Huang,
	Irina Tirdea, Fabio Estevam, Octavian Purdila, Liam Girdwood,
	linux-pm, linux-arm-kernel, linux-kernel

On imx6qp-sabresd LDO_ARM is connected to a different PMIC output than
the other imx6qdl-sabresd boards.

Setting cpu0 arm-supply to sw2_reg is wrong, this must have mistakenly
slipped out of the vendor tree where this is are used for LDO bypass.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/boot/dts/imx6qp-sabresd.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qp-sabresd.dts b/arch/arm/boot/dts/imx6qp-sabresd.dts
index b234580..a8a5004 100644
--- a/arch/arm/boot/dts/imx6qp-sabresd.dts
+++ b/arch/arm/boot/dts/imx6qp-sabresd.dts
@@ -50,8 +50,8 @@
 	compatible = "fsl,imx6qp-sabresd", "fsl,imx6qp";
 };
 
-&cpu0 {
-	arm-supply = <&sw2_reg>;
+&reg_arm {
+	vin-supply = <&sw2_reg>;
 };
 
 &iomuxc {
-- 
2.7.4

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

* Re: [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
@ 2017-04-05  8:03   ` Lucas Stach
  2017-04-11  6:37   ` Viresh Kumar
  2017-04-11  9:27   ` Viresh Kumar
  2 siblings, 0 replies; 12+ messages in thread
From: Lucas Stach @ 2017-04-05  8:03 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Viresh Kumar, Rafael J. Wysocki, Sascha Hauer, Shawn Guo,
	Mark Brown, Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

Am Dienstag, den 04.04.2017, 20:04 +0300 schrieb Leonard Crestez:
> If the cpufreq driver tries to modify voltage/freq during suspend/resume
> it might need to control an external PMIC via I2C or SPI but those
> devices might be already suspended. This issue is likely to happen
> whenever the LDOs have their vin-supply set.
> 
> To avoid this scenario we just increase cpufreq to the maximum before
> suspend.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index be90ee3..786122e 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -161,8 +161,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
>  
>  static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
>  {
> +	int ret;
> +
>  	policy->clk = arm_clk;
> -	return cpufreq_generic_init(policy, freq_table, transition_latency);
> +	ret = cpufreq_generic_init(policy, freq_table, transition_latency);
> +	policy->suspend_freq = policy->max;
> +
> +	return ret;
>  }
>  
>  static struct cpufreq_driver imx6q_cpufreq_driver = {
> @@ -173,6 +178,7 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
>  	.init = imx6q_cpufreq_init,
>  	.name = "imx6q-cpufreq",
>  	.attr = cpufreq_generic_attr,
> +	.suspend = cpufreq_generic_suspend,
>  };
>  
>  static int imx6q_cpufreq_probe(struct platform_device *pdev)

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

* Re: [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply
  2017-04-04 17:04 ` [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply Leonard Crestez
@ 2017-04-07 12:20   ` Shawn Guo
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn Guo @ 2017-04-07 12:20 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer,
	Mark Brown, Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

On Tue, Apr 04, 2017 at 08:04:13PM +0300, Leonard Crestez wrote:
> Setting the supply is optional but beneficial, it will cause PMIC
> voltages to be dynamically changed with cpu frequency.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks.

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

* Re: [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm regulator supply
  2017-04-04 17:04 ` [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm " Leonard Crestez
@ 2017-04-07 12:21   ` Shawn Guo
  0 siblings, 0 replies; 12+ messages in thread
From: Shawn Guo @ 2017-04-07 12:21 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Lucas Stach, Viresh Kumar, Rafael J. Wysocki, Sascha Hauer,
	Mark Brown, Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

On Tue, Apr 04, 2017 at 08:04:14PM +0300, Leonard Crestez wrote:
> On imx6qp-sabresd LDO_ARM is connected to a different PMIC output than
> the other imx6qdl-sabresd boards.
> 
> Setting cpu0 arm-supply to sw2_reg is wrong, this must have mistakenly
> slipped out of the vendor tree where this is are used for LDO bypass.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks.

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

* Re: [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
  2017-04-05  8:03   ` Lucas Stach
@ 2017-04-11  6:37   ` Viresh Kumar
  2017-04-11  8:16     ` Leonard Crestez
  2017-04-11  9:27   ` Viresh Kumar
  2 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2017-04-11  6:37 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Lucas Stach, Rafael J. Wysocki, Sascha Hauer, Shawn Guo,
	Mark Brown, Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

On 04-04-17, 20:04, Leonard Crestez wrote:
> If the cpufreq driver tries to modify voltage/freq during suspend/resume
> it might need to control an external PMIC via I2C or SPI but those
> devices might be already suspended. This issue is likely to happen
> whenever the LDOs have their vin-supply set.
> 
> To avoid this scenario we just increase cpufreq to the maximum before
> suspend.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

I have already Acked this earlier, why didn't you add it ?

-- 
viresh

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

* Re: [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  2017-04-11  6:37   ` Viresh Kumar
@ 2017-04-11  8:16     ` Leonard Crestez
  0 siblings, 0 replies; 12+ messages in thread
From: Leonard Crestez @ 2017-04-11  8:16 UTC (permalink / raw)
  To: Viresh Kumar, Lucas Stach
  Cc: Rafael J. Wysocki, Sascha Hauer, Shawn Guo, Mark Brown,
	Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

On Tue, 2017-04-11 at 12:07 +0530, Viresh Kumar wrote:
> On 04-04-17, 20:04, Leonard Crestez wrote:
> > If the cpufreq driver tries to modify voltage/freq during suspend/resume
> > it might need to control an external PMIC via I2C or SPI but those
> > devices might be already suspended. This issue is likely to happen
> > whenever the LDOs have their vin-supply set.
> > 
> > To avoid this scenario we just increase cpufreq to the maximum before
> > suspend.
> > 
> > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> > ---
> >  drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)

> I have already Acked this earlier, why didn't you add it ?

Because v2 is different based on comments from Lucas. It didn't seem
appropriate to keep an old "Acked-by" in this case.

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

* Re: [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend
  2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
  2017-04-05  8:03   ` Lucas Stach
  2017-04-11  6:37   ` Viresh Kumar
@ 2017-04-11  9:27   ` Viresh Kumar
  2 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2017-04-11  9:27 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Lucas Stach, Rafael J. Wysocki, Sascha Hauer, Shawn Guo,
	Mark Brown, Robin Gong, Anson Huang, Irina Tirdea, Fabio Estevam,
	Octavian Purdila, Liam Girdwood, linux-pm, linux-arm-kernel,
	linux-kernel

On 04-04-17, 20:04, Leonard Crestez wrote:
> If the cpufreq driver tries to modify voltage/freq during suspend/resume
> it might need to control an external PMIC via I2C or SPI but those
> devices might be already suspended. This issue is likely to happen
> whenever the LDOs have their vin-supply set.
> 
> To avoid this scenario we just increase cpufreq to the maximum before
> suspend.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index be90ee3..786122e 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -161,8 +161,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
>  
>  static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
>  {
> +	int ret;
> +
>  	policy->clk = arm_clk;
> -	return cpufreq_generic_init(policy, freq_table, transition_latency);
> +	ret = cpufreq_generic_init(policy, freq_table, transition_latency);
> +	policy->suspend_freq = policy->max;
> +
> +	return ret;
>  }
>  
>  static struct cpufreq_driver imx6q_cpufreq_driver = {
> @@ -173,6 +178,7 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
>  	.init = imx6q_cpufreq_init,
>  	.name = "imx6q-cpufreq",
>  	.attr = cpufreq_generic_attr,
> +	.suspend = cpufreq_generic_suspend,
>  };
>  
>  static int imx6q_cpufreq_probe(struct platform_device *pdev)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH v2 0/4] ARM: imx: Set LDO regulator supply
  2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
                   ` (3 preceding siblings ...)
  2017-04-04 17:04 ` [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm " Leonard Crestez
@ 2017-04-19  9:28 ` Leonard Crestez
  4 siblings, 0 replies; 12+ messages in thread
From: Leonard Crestez @ 2017-04-19  9:28 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: Sascha Hauer, Shawn Guo, Lucas Stach, Mark Brown, Robin Gong,
	Anson Huang, Irina Tirdea, Fabio Estevam, Octavian Purdila,
	Liam Girdwood, linux-pm, linux-arm-kernel, linux-kernel

On Tue, 2017-04-04 at 20:04 +0300, Leonard Crestez wrote:
> Setting the LDO regulator parent is optional but beneficial. It will cause
> the PMIC output voltage to be dynamically set to the minimum input for the
> LDOs, this should be more efficient.
> 
> This propagation was introduced by:
> commit fc42112c0eaa ("regulator: core: Propagate voltage changes to supply
> regulators")
> 
> Changes since v1:
>  * Drop patch 1 since it only avoids logging a warning and the gpc driver
> is going through more changes.
>  * Initialize cpufreq->suspend_freq based on policy->max instead.
>  * Remove reference to ldo-bypass from suspend_freq patch message.

Hello,

This is a gentle reminder that this was sent ~2 weeks ago and patches 1
and 2 are still waiting (with no objections). Patches 3/4 were applied.

--
Regards,
Leonard

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

end of thread, other threads:[~2017-04-19  9:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 17:04 [PATCH v2 0/4] ARM: imx: Set LDO regulator supply Leonard Crestez
2017-04-04 17:04 ` [PATCH v2 1/4] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Leonard Crestez
2017-04-04 17:04 ` [PATCH v2 2/4] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
2017-04-05  8:03   ` Lucas Stach
2017-04-11  6:37   ` Viresh Kumar
2017-04-11  8:16     ` Leonard Crestez
2017-04-11  9:27   ` Viresh Kumar
2017-04-04 17:04 ` [PATCH v2 3/4] ARM: dts: imx6qdl-sabresd: Set LDO regulator supply Leonard Crestez
2017-04-07 12:20   ` Shawn Guo
2017-04-04 17:04 ` [PATCH v2 4/4] ARM: dts: imx6qp-sabresd: Set reg_arm " Leonard Crestez
2017-04-07 12:21   ` Shawn Guo
2017-04-19  9:28 ` [PATCH v2 0/4] ARM: imx: Set LDO " Leonard Crestez

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).