Go to the documentation of this file.
26 #ifndef __RTL871X_PWRCTRL_H_
27 #define __RTL871X_PWRCTRL_H_
33 #define CMD_ALIVE BIT(2)
58 #define PS_LCLK (PS_DPS)
59 #define PS_RF_OFF BIT(1)
60 #define PS_ALL_ON BIT(2)
61 #define PS_ST_ACTIVE BIT(3)
64 #define PS_STATE_MASK (0x0F)
65 #define PS_STATE_HW_MASK (0x07)
66 #define PS_SEQ_MASK (0xc0)
68 #define PS_STATE(x) (PS_STATE_MASK & (x))
69 #define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x))
70 #define PS_SEQ(x) (PS_SEQ_MASK & (x))
72 #define PS_STATE_S0 (PS_DPS)
73 #define PS_STATE_S1 (PS_LCLK)
74 #define PS_STATE_S2 (PS_RF_OFF)
75 #define PS_STATE_S3 (PS_ALL_ON)
76 #define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON))
79 #define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON))
80 #define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE))
81 #define CLR_PS_STATE(x) ((x) = ((x) & (0xF0)))
90 static inline void _enter_pwrlock(
struct semaphore *plock)