| Solomon Peachy | a910e4a | 2013-05-24 20:04:38 -0400 | [diff] [blame] | 1 | /* | 
 | 2 |  * Mac80211 power management interface for ST-Ericsson CW1200 mac80211 drivers | 
 | 3 |  * | 
 | 4 |  * Copyright (c) 2011, ST-Ericsson | 
 | 5 |  * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no> | 
 | 6 |  * | 
 | 7 |  * This program is free software; you can redistribute it and/or modify | 
 | 8 |  * it under the terms of the GNU General Public License version 2 as | 
 | 9 |  * published by the Free Software Foundation. | 
 | 10 |  */ | 
 | 11 |  | 
 | 12 | #ifndef PM_H_INCLUDED | 
 | 13 | #define PM_H_INCLUDED | 
 | 14 |  | 
 | 15 | /* ******************************************************************** */ | 
 | 16 | /* mac80211 API								*/ | 
 | 17 |  | 
 | 18 | /* extern */  struct cw1200_common; | 
 | 19 | /* private */ struct cw1200_suspend_state; | 
 | 20 |  | 
 | 21 | struct cw1200_pm_state { | 
 | 22 | 	struct cw1200_suspend_state *suspend_state; | 
 | 23 | 	struct timer_list stay_awake; | 
 | 24 | 	struct platform_device *pm_dev; | 
 | 25 | 	spinlock_t lock; /* Protect access */ | 
 | 26 | }; | 
 | 27 |  | 
| Solomon Peachy | 4e17b87 | 2013-05-29 22:22:05 -0400 | [diff] [blame] | 28 | #ifdef CONFIG_PM | 
| Solomon Peachy | a910e4a | 2013-05-24 20:04:38 -0400 | [diff] [blame] | 29 | int cw1200_pm_init(struct cw1200_pm_state *pm, | 
 | 30 | 		    struct cw1200_common *priv); | 
 | 31 | void cw1200_pm_deinit(struct cw1200_pm_state *pm); | 
| Solomon Peachy | a910e4a | 2013-05-24 20:04:38 -0400 | [diff] [blame] | 32 | int cw1200_wow_suspend(struct ieee80211_hw *hw, | 
 | 33 | 		       struct cfg80211_wowlan *wowlan); | 
 | 34 | int cw1200_wow_resume(struct ieee80211_hw *hw); | 
 | 35 | int cw1200_can_suspend(struct cw1200_common *priv); | 
| Solomon Peachy | 4e17b87 | 2013-05-29 22:22:05 -0400 | [diff] [blame] | 36 | void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, | 
 | 37 | 			  unsigned long tmo); | 
 | 38 | #else | 
 | 39 | static inline void cw1200_pm_stay_awake(struct cw1200_pm_state *pm, | 
 | 40 | 					unsigned long tmo) { | 
 | 41 | } | 
 | 42 | #endif | 
| Solomon Peachy | a910e4a | 2013-05-24 20:04:38 -0400 | [diff] [blame] | 43 | #endif |