aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-07 18:27:52 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 19:44:59 -0400
commit455ae3a5d4191e60f50cd9faf72f9dc9f233242d (patch)
tree8c98460e2f4b49c36e4a7fc72530a9fe0f816d0f /arch/arm/mach-shmobile
parent8ae28ecb8726db5904f0f703f100315377b0172b (diff)
ARM: shmobile: Allow device latencies to be specified directly
Make it possible to specify device start/stop and save/restore state latencies directy when adding devices to PM domains. For this purpose, introduce rmobile_add_device_to_domain_td() whose third argument is a pointer to a struct gpd_timing_data object containing device latency data. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/include/mach/pm-rmobile.h14
-rw-r--r--arch/arm/mach-shmobile/pm-rmobile.c7
2 files changed, 16 insertions, 5 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
index 7fd9ad1fefe4..4d02f7488dde 100644
--- a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
+++ b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
@@ -31,10 +31,20 @@ struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
31 31
32#ifdef CONFIG_PM 32#ifdef CONFIG_PM
33extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); 33extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
34extern void rmobile_add_device_to_domain(const char *domain_name, 34extern void rmobile_add_device_to_domain_td(const char *domain_name,
35 struct platform_device *pdev); 35 struct platform_device *pdev,
36 struct gpd_timing_data *td);
37
38static inline void rmobile_add_device_to_domain(const char *domain_name,
39 struct platform_device *pdev)
40{
41 rmobile_add_device_to_domain_td(domain_name, pdev, NULL);
42}
43
36#else 44#else
45
37#define rmobile_init_domains(domains, num) do { } while (0) 46#define rmobile_init_domains(domains, num) do { } while (0)
47#define rmobile_add_device_to_domain_td(name, pdev, td) do { } while (0)
38#define rmobile_add_device_to_domain(name, pdev) do { } while (0) 48#define rmobile_add_device_to_domain(name, pdev) do { } while (0)
39#endif /* CONFIG_PM */ 49#endif /* CONFIG_PM */
40 50
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index 63f35665df31..682575a2243c 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -157,12 +157,13 @@ void rmobile_init_domains(struct rmobile_pm_domain domains[], int num)
157 rmobile_init_pm_domain(&domains[j]); 157 rmobile_init_pm_domain(&domains[j]);
158} 158}
159 159
160void rmobile_add_device_to_domain(const char *domain_name, 160void rmobile_add_device_to_domain_td(const char *domain_name,
161 struct platform_device *pdev) 161 struct platform_device *pdev,
162 struct gpd_timing_data *td)
162{ 163{
163 struct device *dev = &pdev->dev; 164 struct device *dev = &pdev->dev;
164 165
165 pm_genpd_name_add_device(domain_name, dev); 166 __pm_genpd_name_add_device(domain_name, dev, td);
166 if (pm_clk_no_clocks(dev)) 167 if (pm_clk_no_clocks(dev))
167 pm_clk_add(dev, NULL); 168 pm_clk_add(dev, NULL);
168} 169}