aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-03-29 19:10:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 15:05:57 -0400
commit8fe2b65a18e49bfde56a59ed4ab3fc7aa0c2f325 (patch)
treea813fe635b7a8c248c586de847d1501c4ccaab6b /include/linux
parent5100d5ac81b9330dc57e35adbe50923ba6107b8f (diff)
ssb: Turn suspend/resume upside down
Turn the SSB bus suspend mechanism upside down. Instead of deciding by an internal reference count when to suspend/resume, let the parent bus call us in their suspend/resume routine. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ssb/ssb.h10
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 8644e03cf588..a8ca396f810a 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -260,9 +260,6 @@ struct ssb_bus {
260 struct ssb_device devices[SSB_MAX_NR_CORES]; 260 struct ssb_device devices[SSB_MAX_NR_CORES];
261 u8 nr_devices; 261 u8 nr_devices;
262 262
263 /* Reference count. Number of suspended devices. */
264 u8 suspend_cnt;
265
266 /* Software ID number for this bus. */ 263 /* Software ID number for this bus. */
267 unsigned int busnumber; 264 unsigned int busnumber;
268 265
@@ -334,6 +331,13 @@ extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus,
334 331
335extern void ssb_bus_unregister(struct ssb_bus *bus); 332extern void ssb_bus_unregister(struct ssb_bus *bus);
336 333
334/* Suspend a SSB bus.
335 * Call this from the parent bus suspend routine. */
336extern int ssb_bus_suspend(struct ssb_bus *bus);
337/* Resume a SSB bus.
338 * Call this from the parent bus resume routine. */
339extern int ssb_bus_resume(struct ssb_bus *bus);
340
337extern u32 ssb_clockspeed(struct ssb_bus *bus); 341extern u32 ssb_clockspeed(struct ssb_bus *bus);
338 342
339/* Is the device enabled in hardware? */ 343/* Is the device enabled in hardware? */
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index b548a54ff1f5..7d7e03dcf77c 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -367,8 +367,7 @@ static inline bool ssb_chipco_available(struct ssb_chipcommon *cc)
367 367
368extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); 368extern void ssb_chipcommon_init(struct ssb_chipcommon *cc);
369 369
370#include <linux/pm.h> 370extern void ssb_chipco_suspend(struct ssb_chipcommon *cc);
371extern void ssb_chipco_suspend(struct ssb_chipcommon *cc, pm_message_t state);
372extern void ssb_chipco_resume(struct ssb_chipcommon *cc); 371extern void ssb_chipco_resume(struct ssb_chipcommon *cc);
373 372
374extern void ssb_chipco_get_clockcpu(struct ssb_chipcommon *cc, 373extern void ssb_chipco_get_clockcpu(struct ssb_chipcommon *cc,