From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
"Linux-sh list" <linux-sh@vger.kernel.org>,
Olof Johansson <olof@lixom.net>
Subject: [RFC][PATCH 5/5] PM / shmobile: Allow device latencies to be read from a DT
Date: Sat, 21 Jul 2012 23:56:28 +0200 [thread overview]
Message-ID: <201207212356.28513.rjw@sisk.pl> (raw)
In-Reply-To: <201207212349.18294.rjw@sisk.pl>
Modify rmobile_read_domain_from_dt() so that it can read device
latency information from the device tree along with the PM
domain name and make it use rmobile_add_device_to_domain_td()
for adding the device to the PM domain along with the device latency
data.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/arm/mach-shmobile/pm-rmobile.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
Index: linux/arch/arm/mach-shmobile/pm-rmobile.c
===================================================================
--- linux.orig/arch/arm/mach-shmobile/pm-rmobile.c
+++ linux/arch/arm/mach-shmobile/pm-rmobile.c
@@ -170,14 +170,34 @@ void rmobile_add_device_to_domain_td(con
static void rmobile_read_domain_from_dt(struct device *dev)
{
+ struct gpd_timing_data latencies = { 0 };
const char *domain_name;
+ u64 val;
int ret;
ret = of_property_read_string(dev->of_node, "renesas,pmdomain",
&domain_name);
+ if (ret)
+ return;
+
+ ret = of_property_read_u64(dev->of_node, "pm-stop-latency", &val);
+ if (!ret)
+ latencies.stop_latency_ns = val;
+
+ ret = of_property_read_u64(dev->of_node, "pm-start-latency", &val);
+ if (!ret)
+ latencies.start_latency_ns = val;
+
+ ret = of_property_read_u64(dev->of_node, "pm-save-latency", &val);
+ if (!ret)
+ latencies.save_state_latency_ns = val;
+
+ ret = of_property_read_u64(dev->of_node, "pm-restore-latency", &val);
if (!ret)
- rmobile_add_device_to_domain(domain_name,
- to_platform_device(dev));
+ latencies.restore_state_latency_ns = val;
+
+ rmobile_add_device_to_domain_td(domain_name, to_platform_device(dev),
+ &latencies);
}
static void rmobile_remove_from_domain(struct device *dev)
next prev parent reply other threads:[~2012-07-21 21:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 21:49 [RFC][PATCH 0/5] PM / shmobile: Specify PM domain and device latency information directly Rafael J. Wysocki
2012-07-21 21:53 ` [RFC][PATCH 1/5] PM / shmobile: Set SH7372 PM domain on/off latencies directly Rafael J. Wysocki
2012-07-21 21:54 ` [RFC][PATCH 2/5] PM / shmobile: Allow device latencies to be specified directly Rafael J. Wysocki
2012-07-21 21:54 ` [RFC][PATCH 3/5] PM / shmobile: Specify device latencies for SH7372 devices directly Rafael J. Wysocki
2012-07-21 21:55 ` [RFC][PATCH 4/5] PM / shmobile: Specify device latencies for Mackerel " Rafael J. Wysocki
2012-07-21 21:56 ` Rafael J. Wysocki [this message]
2012-08-07 22:26 ` [PATCH 0/4] PM / shmobile: Specify PM domain and device latency information directly Rafael J. Wysocki
2012-08-07 22:27 ` [PATCH 1/4] PM / shmobile: Set PM domain on/off latencies directly Rafael J. Wysocki
2012-08-07 22:27 ` [PATCH 2/4] PM / shmobile: Allow device latencies to be specified directly Rafael J. Wysocki
2012-08-07 22:28 ` [PATCH 3/4] PM / shmobile: Specify device latencies for SH7372 devices directly Rafael J. Wysocki
2012-08-07 22:29 ` [PATCH 4/4] PM / shmobile: Specify device latencies for Mackerel " Rafael J. Wysocki
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=201207212356.28513.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=olof@lixom.net \
/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).