1
2
3
4
5
6#ifndef __WIL_PLATFORM_H__
7#define __WIL_PLATFORM_H__
8
9struct device;
10
11enum wil_platform_event {
12 WIL_PLATFORM_EVT_FW_CRASH = 0,
13 WIL_PLATFORM_EVT_PRE_RESET = 1,
14 WIL_PLATFORM_EVT_FW_RDY = 2,
15 WIL_PLATFORM_EVT_PRE_SUSPEND = 3,
16 WIL_PLATFORM_EVT_POST_SUSPEND = 4,
17};
18
19enum wil_platform_features {
20 WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL = 0,
21 WIL_PLATFORM_FEATURE_TRIPLE_MSI = 1,
22 WIL_PLATFORM_FEATURE_MAX,
23};
24
25enum wil_platform_capa {
26 WIL_PLATFORM_CAPA_RADIO_ON_IN_SUSPEND = 0,
27 WIL_PLATFORM_CAPA_T_PWR_ON_0 = 1,
28 WIL_PLATFORM_CAPA_EXT_CLK = 2,
29 WIL_PLATFORM_CAPA_MAX,
30};
31
32
33
34
35
36struct wil_platform_ops {
37 int (*bus_request)(void *handle, uint32_t kbps );
38 int (*suspend)(void *handle, bool keep_device_power);
39 int (*resume)(void *handle, bool device_powered_on);
40 void (*uninit)(void *handle);
41 int (*notify)(void *handle, enum wil_platform_event evt);
42 int (*get_capa)(void *handle);
43 void (*set_features)(void *handle, int features);
44};
45
46
47
48
49
50
51
52
53
54
55
56struct wil_platform_rops {
57 int (*ramdump)(void *wil_handle, void *buf, uint32_t size);
58 int (*fw_recovery)(void *wil_handle);
59};
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75void *wil_platform_init(struct device *dev, struct wil_platform_ops *ops,
76 const struct wil_platform_rops *rops, void *wil_handle);
77
78int __init wil_platform_modinit(void);
79void wil_platform_modexit(void);
80
81#endif
82