Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220296 > unrolled thread

[PATCH v4 0/4] cpufreq-dt: add suspend frequency support

Started byBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
First post2015-09-07 17:50 +0200
Last post2015-09-17 00:50 +0200
Articles 8 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-09-07 17:50 +0200
    [PATCH v4 1/4] PM / OPP: add dev_pm_opp_get_suspend_opp() helper Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2015-09-07 17:50 +0200
    Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Viresh Kumar <viresh.kumar@linaro.org> - 2015-09-08 04:50 +0200
      Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-09-08 06:00 +0200
        Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Viresh Kumar <viresh.kumar@linaro.org> - 2015-09-08 06:30 +0200
          Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-09-08 06:50 +0200
            Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Viresh Kumar <viresh.kumar@linaro.org> - 2015-09-08 07:20 +0200
              Re: [PATCH v4 0/4] cpufreq-dt: add suspend frequency support Kukjin Kim <kgene@kernel.org> - 2015-09-17 00:50 +0200

#1220296 — [PATCH v4 0/4] cpufreq-dt: add suspend frequency support

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2015-09-07 17:50 +0200
Subject[PATCH v4 0/4] cpufreq-dt: add suspend frequency support
Message-ID<q66Q9-1px-17@gated-at.bofh.it>
Hi,

This patch series adds suspend frequency support (using opp-v2
bindings and suspend-opp functionality) to cpufreq-dt driver and
then adds suspend opp for Exynos4412 based boards.

This patch series fixes suspend/resume support on Exynos4412
based Trats2 board and reboot hang on Exynos4412 based Odroid
U3 board.

Changes since v3:
- fixed dev_pm_opp_get_suspend_opp() locking
- shortened variable name in dev_pm_opp_get_suspend_opp()
- adjusted cpufreq_generic_suspend() to work with cpufreq-dt
- removed no longer needed cpufreq_dt_suspend()
- added Acked-by tag from Viresh to patch #4

Changes since v2:
- rewrote to use suspend-opp functionality

Changes since v1:
- removed superfluous ";"

Depends on:
- next-20150902 branch of linux-next kernel tree

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Bartlomiej Zolnierkiewicz (4):
  PM / OPP: add dev_pm_opp_get_suspend_opp() helper
  cpufreq: allow cpufreq_generic_suspend() to work without suspend
    frequency
  cpufreq-dt: add suspend frequency support
  ARM: dts: add suspend opp to exynos4412

 arch/arm/boot/dts/exynos4412.dtsi |  1 +
 drivers/base/power/opp.c          | 30 ++++++++++++++++++++++++++++++
 drivers/cpufreq/cpufreq-dt.c      | 11 +++++++++++
 drivers/cpufreq/cpufreq.c         |  4 ++--
 include/linux/pm_opp.h            |  6 ++++++
 5 files changed, 50 insertions(+), 2 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1220297 — [PATCH v4 1/4] PM / OPP: add dev_pm_opp_get_suspend_opp() helper

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2015-09-07 17:50 +0200
Subject[PATCH v4 1/4] PM / OPP: add dev_pm_opp_get_suspend_opp() helper
Message-ID<q66Qa-1px-37@gated-at.bofh.it>
In reply to#1220296
Add dev_pm_opp_get_suspend_opp() helper to obtain suspend opp.

Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/base/power/opp.c | 30 ++++++++++++++++++++++++++++++
 include/linux/pm_opp.h   |  6 ++++++
 2 files changed, 36 insertions(+)

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index eb25449..3d948ea 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -341,6 +341,36 @@ unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
 EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_clock_latency);
 
 /**
+ * dev_pm_opp_get_suspend_opp() - Get suspend opp
+ * @dev:	device for which we do this operation
+ *
+ * Return: This function returns pointer to the suspend opp if it is
+ * defined, otherwise it returns NULL.
+ *
+ * Locking: This function must be called under rcu_read_lock(). opp is a rcu
+ * protected pointer. The reason for the same is that the opp pointer which is
+ * returned will remain valid for use with opp_get_{voltage, freq} only while
+ * under the locked area. The pointer returned must be used prior to unlocking
+ * with rcu_read_unlock() to maintain the integrity of the pointer.
+ */
+struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev)
+{
+	struct device_opp *dev_opp;
+	struct dev_pm_opp *opp;
+
+	opp_rcu_lockdep_assert();
+
+	dev_opp = _find_device_opp(dev);
+	if (IS_ERR(dev_opp))
+		opp = NULL;
+	else
+		opp = dev_opp->suspend_opp;
+
+	return opp;
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_get_suspend_opp);
+
+/**
  * dev_pm_opp_get_opp_count() - Get number of opps available in the opp list
  * @dev:	device for which we do this operation
  *
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index cab7ba5..e817722 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -34,6 +34,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
 
 int dev_pm_opp_get_opp_count(struct device *dev);
 unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev);
+struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev);
 
 struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 					      unsigned long freq,
@@ -80,6 +81,11 @@ static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
 	return 0;
 }
 
+static inline struct dev_pm_opp *dev_pm_opp_get_suspend_opp(struct device *dev)
+{
+	return NULL;
+}
+
 static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
 					unsigned long freq, bool available)
 {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220461

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-09-08 04:50 +0200
Message-ID<q6h8R-7Zt-5@gated-at.bofh.it>
In reply to#1220296
On 07-09-15, 17:41, Bartlomiej Zolnierkiewicz wrote:
> Hi,
> 
> This patch series adds suspend frequency support (using opp-v2
> bindings and suspend-opp functionality) to cpufreq-dt driver and
> then adds suspend opp for Exynos4412 based boards.
> 
> This patch series fixes suspend/resume support on Exynos4412
> based Trats2 board and reboot hang on Exynos4412 based Odroid
> U3 board.
> 
> Changes since v3:
> - fixed dev_pm_opp_get_suspend_opp() locking
> - shortened variable name in dev_pm_opp_get_suspend_opp()
> - adjusted cpufreq_generic_suspend() to work with cpufreq-dt
> - removed no longer needed cpufreq_dt_suspend()
> - added Acked-by tag from Viresh to patch #4

Just a minor comment on 3/4 and after fixing that:

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

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220469

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2015-09-08 06:00 +0200
Message-ID<q6ieC-13a-9@gated-at.bofh.it>
In reply to#1220461
On 08.09.2015 11:46, Viresh Kumar wrote:
> On 07-09-15, 17:41, Bartlomiej Zolnierkiewicz wrote:
>> Hi,
>>
>> This patch series adds suspend frequency support (using opp-v2
>> bindings and suspend-opp functionality) to cpufreq-dt driver and
>> then adds suspend opp for Exynos4412 based boards.
>>
>> This patch series fixes suspend/resume support on Exynos4412
>> based Trats2 board and reboot hang on Exynos4412 based Odroid
>> U3 board.
>>
>> Changes since v3:
>> - fixed dev_pm_opp_get_suspend_opp() locking
>> - shortened variable name in dev_pm_opp_get_suspend_opp()
>> - adjusted cpufreq_generic_suspend() to work with cpufreq-dt
>> - removed no longer needed cpufreq_dt_suspend()
>> - added Acked-by tag from Viresh to patch #4
> 
> Just a minor comment on 3/4 and after fixing that:
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Dear Kukjin,

There were no comments from your side for this patchset nor for previous
Marek's fix. After mentioned change and Bart's re-spin, do you plan to
grab this patchset and send it for current v4.3 cycle?

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220471

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-09-08 06:30 +0200
Message-ID<q6iHD-1RX-1@gated-at.bofh.it>
In reply to#1220469
On 08-09-15, 12:56, Krzysztof Kozlowski wrote:
> There were no comments from your side for this patchset nor for previous
> Marek's fix. After mentioned change and Bart's re-spin, do you plan to
> grab this patchset and send it for current v4.3 cycle?

Why do you think it should go via Kukjin's tree and not Rafael's?

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220474

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2015-09-08 06:50 +0200
Message-ID<q6j10-2ec-3@gated-at.bofh.it>
In reply to#1220471
On 08.09.2015 13:20, Viresh Kumar wrote:
> On 08-09-15, 12:56, Krzysztof Kozlowski wrote:
>> There were no comments from your side for this patchset nor for previous
>> Marek's fix. After mentioned change and Bart's re-spin, do you plan to
>> grab this patchset and send it for current v4.3 cycle?
> 
> Why do you think it should go via Kukjin's tree and not Rafael's?

Somehow my mind stuck on solving Exynos4x12 cpufreq issues.

Right, it should go through Rafael's, probably except DTS patch (4/4)
because it depends on previous DTS changes. These changes are still in
arm-soc, not in Linus' tree [0].

Best regards,
Krzysztof

[0]
https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/commit/?h=next/late&id=f44997412e5b39b6a1231f16555120c5b2aae0ed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1220481

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-09-08 07:20 +0200
Message-ID<q6ju1-31O-1@gated-at.bofh.it>
In reply to#1220474
On 08-09-15, 13:48, Krzysztof Kozlowski wrote:
> Somehow my mind stuck on solving Exynos4x12 cpufreq issues.
> 
> Right, it should go through Rafael's, probably except DTS patch (4/4)
> because it depends on previous DTS changes. These changes are still in
> arm-soc, not in Linus' tree [0].

That's bad :(

Anyway, 4/4 is kind of independent to this series, in the sense that
it wouldn't harm even if it gets applied separately.

So, go ahead and apply 4/4 to Samsung's tree and rest of this can be
picked by Rafael.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1226548

FromKukjin Kim <kgene@kernel.org>
Date2015-09-17 00:50 +0200
Message-ID<q9tGx-1k7-1@gated-at.bofh.it>
In reply to#1220481
On 09/08/15 14:10, Viresh Kumar wrote:
> On 08-09-15, 13:48, Krzysztof Kozlowski wrote:
>> Somehow my mind stuck on solving Exynos4x12 cpufreq issues.
>>
>> Right, it should go through Rafael's, probably except DTS patch (4/4)
>> because it depends on previous DTS changes. These changes are still in
>> arm-soc, not in Linus' tree [0].
> 
> That's bad :(
> 
> Anyway, 4/4 is kind of independent to this series, in the sense that
> it wouldn't harm even if it gets applied separately.
> 
> So, go ahead and apply 4/4 to Samsung's tree and rest of this can be
> picked by Rafael.
> 
Applied 4/4 into samsung tree, thanks.

- Kukjin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web