spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / include / linux / mfd / db5500-prcmu.h
blob9890687f582de0c36cdbcc56cf252a381e82e8ee
1 /*
2 * Copyright (C) ST-Ericsson SA 2010
4 * License Terms: GNU General Public License v2
6 * U5500 PRCMU API.
7 */
8 #ifndef __MFD_DB5500_PRCMU_H
9 #define __MFD_DB5500_PRCMU_H
11 #ifdef CONFIG_MFD_DB5500_PRCMU
13 void db5500_prcmu_early_init(void);
14 int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state);
15 int db5500_prcmu_set_display_clocks(void);
16 int db5500_prcmu_disable_dsipll(void);
17 int db5500_prcmu_enable_dsipll(void);
18 int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
19 int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
20 void db5500_prcmu_enable_wakeups(u32 wakeups);
21 int db5500_prcmu_request_clock(u8 clock, bool enable);
22 void db5500_prcmu_config_abb_event_readout(u32 abb_events);
23 void db5500_prcmu_get_abb_event_buffer(void __iomem **buf);
24 int prcmu_resetout(u8 resoutn, u8 state);
25 int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
26 bool keep_ap_pll);
27 int db5500_prcmu_config_esram0_deep_sleep(u8 state);
28 void db5500_prcmu_system_reset(u16 reset_code);
29 u16 db5500_prcmu_get_reset_code(void);
30 bool db5500_prcmu_is_ac_wake_requested(void);
31 int db5500_prcmu_set_arm_opp(u8 opp);
32 int db5500_prcmu_get_arm_opp(void);
34 #else /* !CONFIG_UX500_SOC_DB5500 */
36 static inline void db5500_prcmu_early_init(void) {}
38 static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
40 return -ENOSYS;
43 static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
45 return -ENOSYS;
48 static inline int db5500_prcmu_request_clock(u8 clock, bool enable)
50 return 0;
53 static inline int db5500_prcmu_set_display_clocks(void)
55 return 0;
58 static inline int db5500_prcmu_disable_dsipll(void)
60 return 0;
63 static inline int db5500_prcmu_enable_dsipll(void)
65 return 0;
68 static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state)
70 return 0;
73 static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {}
75 static inline int prcmu_resetout(u8 resoutn, u8 state)
77 return 0;
80 static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state)
82 return 0;
85 static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {}
86 static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {}
88 static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk,
89 bool keep_ap_pll)
91 return 0;
94 static inline void db5500_prcmu_system_reset(u16 reset_code) {}
96 static inline u16 db5500_prcmu_get_reset_code(void)
98 return 0;
101 static inline bool db5500_prcmu_is_ac_wake_requested(void)
103 return 0;
106 static inline int db5500_prcmu_set_arm_opp(u8 opp)
108 return 0;
111 static inline int db5500_prcmu_get_arm_opp(void)
113 return 0;
117 #endif /* CONFIG_MFD_DB5500_PRCMU */
119 #endif /* __MFD_DB5500_PRCMU_H */