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#include <linux/err.h>
28
29
30enum {
31 WL12XX_REFCLOCK_19 = 0,
32 WL12XX_REFCLOCK_26 = 1,
33 WL12XX_REFCLOCK_38 = 2,
34 WL12XX_REFCLOCK_52 = 3,
35 WL12XX_REFCLOCK_38_XTAL = 4,
36 WL12XX_REFCLOCK_26_XTAL = 5,
37};
38
39
40enum {
41 WL12XX_TCXOCLOCK_19_2 = 0,
42 WL12XX_TCXOCLOCK_26 = 1,
43 WL12XX_TCXOCLOCK_38_4 = 2,
44 WL12XX_TCXOCLOCK_52 = 3,
45 WL12XX_TCXOCLOCK_16_368 = 4,
46 WL12XX_TCXOCLOCK_32_736 = 5,
47 WL12XX_TCXOCLOCK_16_8 = 6,
48 WL12XX_TCXOCLOCK_33_6 = 7,
49};
50
51struct wl12xx_platform_data {
52 void (*set_power)(bool enable);
53
54 int irq;
55 bool use_eeprom;
56 int board_ref_clock;
57 int board_tcxo_clock;
58 unsigned long platform_quirks;
59 bool pwr_in_suspend;
60};
61
62
63#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
64
65#ifdef CONFIG_WILINK_PLATFORM_DATA
66
67int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
68
69struct wl12xx_platform_data *wl12xx_get_platform_data(void);
70
71#else
72
73static inline
74int wl12xx_set_platform_data(const struct wl12xx_platform_data *data)
75{
76 return -ENOSYS;
77}
78
79static inline
80struct wl12xx_platform_data *wl12xx_get_platform_data(void)
81{
82 return ERR_PTR(-ENODATA);
83}
84
85#endif
86
87#endif
88