linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] cpuidle: exynos: Allow to use the driver without AFTR
@ 2014-07-21  8:36 Krzysztof Kozlowski
  2014-07-21  8:36 ` [PATCH 2/3] ARM: EXYNOS: Enable cpuidle in WFI on all SoCs Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2014-07-21  8:36 UTC (permalink / raw)
  To: Russell King, Kukjin Kim, Rafael J. Wysocki, Daniel Lezcano,
	Sachin Kamat, Tushar Behera, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-pm
  Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz,
	Tomasz Figa, Krzysztof Kozlowski

Allow the driver to be used when AFTR enter function is not provided
(device platform data is NULL).

This actually does not give any special energy-saving benefits but
allows to track the idle time of each core. Additionally it is a safe
way to validate supplied platform data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/cpuidle/cpuidle-exynos.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/cpuidle/cpuidle-exynos.c b/drivers/cpuidle/cpuidle-exynos.c
index 7c0151263828..5325a394be7e 100644
--- a/drivers/cpuidle/cpuidle-exynos.c
+++ b/drivers/cpuidle/cpuidle-exynos.c
@@ -77,7 +77,10 @@ static int exynos_cpuidle_probe(struct platform_device *pdev)
 {
 	int ret;
 
+	/* If NULL enter only WFI */
 	exynos_enter_aftr = (void *)(pdev->dev.platform_data);
+	if (!exynos_enter_aftr)
+		exynos_idle_driver.state_count = 1;
 
 	ret = cpuidle_register(&exynos_idle_driver, NULL);
 	if (ret) {
-- 
1.9.1


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

end of thread, other threads:[~2014-07-21 10:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21  8:36 [PATCH 1/3] cpuidle: exynos: Allow to use the driver without AFTR Krzysztof Kozlowski
2014-07-21  8:36 ` [PATCH 2/3] ARM: EXYNOS: Enable cpuidle in WFI on all SoCs Krzysztof Kozlowski
2014-07-21  8:36 ` [PATCH 3/3] ARM: exynos_defconfig: Enable cpuidle driver Krzysztof Kozlowski
2014-07-21  9:53 ` [PATCH 1/3] cpuidle: exynos: Allow to use the driver without AFTR Daniel Lezcano
2014-07-21 10:08   ` Krzysztof Kozlowski

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