1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _LINUX_WL12XX_H
25#define _LINUX_WL12XX_H
26
27
28enum {
29 WL12XX_REFCLOCK_19 = 0,
30 WL12XX_REFCLOCK_26 = 1,
31 WL12XX_REFCLOCK_38 = 2,
32 WL12XX_REFCLOCK_52 = 3,
33 WL12XX_REFCLOCK_38_XTAL = 4,
34 WL12XX_REFCLOCK_26_XTAL = 5,
35};
36
37
38enum {
39 WL12XX_TCXOCLOCK_19_2 = 0,
40 WL12XX_TCXOCLOCK_26 = 1,
41 WL12XX_TCXOCLOCK_38_4 = 2,
42 WL12XX_TCXOCLOCK_52 = 3,
43 WL12XX_TCXOCLOCK_16_368 = 4,
44 WL12XX_TCXOCLOCK_32_736 = 5,
45 WL12XX_TCXOCLOCK_16_8 = 6,
46 WL12XX_TCXOCLOCK_33_6 = 7,
47};
48
49struct wl12xx_platform_data {
50 void (*set_power)(bool enable);
51
52 int irq;
53 bool use_eeprom;
54 int board_ref_clock;
55 int board_tcxo_clock;
56 unsigned long platform_quirks;
57 bool pwr_in_suspend;
58
59 struct wl1271_if_operations *ops;
60};
61
62
63#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
64
65#ifdef CONFIG_WL12XX_PLATFORM_DATA
66
67int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
68
69#else
70
71static inline
72int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
73{
74 return -ENOSYS;
75}
76
77#endif
78
79struct wl12xx_platform_data *wl12xx_get_platform_data(void);
80
81#endif
82