linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] drivers: cpuidle: Add status property to ARM idle states
Date: Wed, 19 Nov 2014 11:17:56 +0100	[thread overview]
Message-ID: <1416392278-18397-1-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <546C6DEB.8060204@linaro.org>

From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

On some platforms the device tree bindings must provide the kernel
with a status flag for idle states, that defines whether the idle
state is operational or not in the current configuration.

This patch adds a status property to the ARM idle states compliant
with ePAPR v1.1 and updates the DT parsing code accordingly.

Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 Documentation/devicetree/bindings/arm/idle-states.txt | 14 ++++++++++++++
 drivers/cpuidle/dt_idle_states.c                      |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt
index 37375c7..5e51511 100644
--- a/Documentation/devicetree/bindings/arm/idle-states.txt
+++ b/Documentation/devicetree/bindings/arm/idle-states.txt
@@ -317,6 +317,20 @@ follows:
 			    In such systems entry-latency-us + exit-latency-us
 			    will exceed wakeup-latency-us by this duration.
 
+	- status:
+		Usage: Optional
+		Value type: <string>
+		Definition: A standard device tree property [5] that indicates
+			    the operational status of an idle-state.
+			    If present, it shall be:
+			    "okay": to indicate that the idle state is
+				    operational.
+			    "disabled": to indicate that the idle state has
+					been disabled in firmware so it is not
+					operational.
+			    If the property is not present the idle-state must
+			    be considered operational.
+
 	In addition to the properties listed above, a state node may require
 	additional properties specifics to the entry-method defined in the
 	idle-states node, please refer to the entry-method bindings
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 52f4d11..22840f4 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -169,6 +169,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
 		if (!state_node)
 			break;
 
+		if (!of_device_is_available(state_node))
+			continue;
+
 		if (!idle_state_valid(state_node, i, cpumask)) {
 			pr_warn("%s idle state not valid, bailing out\n",
 				state_node->full_name);
-- 
1.9.1

  reply	other threads:[~2014-11-19 10:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 10:16 [GIT PULL] cpuidle: A few improvements for ARM cpuidle via DT Daniel Lezcano
2014-11-19 10:17 ` Daniel Lezcano [this message]
2014-11-19 10:17   ` [PATCH 2/3] drivers: cpuidle: Add idle-state-name description to ARM idle states Daniel Lezcano
2014-11-19 10:17   ` [PATCH 3/3] drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages Daniel Lezcano
2014-11-21 15:56 ` [GIT PULL] cpuidle: A few improvements for ARM cpuidle via DT Rafael J. Wysocki
2014-11-21 16:13   ` Daniel Lezcano
  -- strict thread matches above, loose matches on Subject: below --
2014-10-16 13:59 [PATCH 1/3] drivers: cpuidle: add status property to ARM idle states Lorenzo Pieralisi
2014-10-20 21:38 ` Kevin Hilman
2014-10-21 16:20   ` Lorenzo Pieralisi
2014-11-10  7:45     ` Daniel Lezcano
2014-11-10 12:48       ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416392278-18397-1-git-send-email-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).