1
2
3
4
5
6
7 #ifndef _LINUX_ISHTP_CL_BUS_H
8 #define _LINUX_ISHTP_CL_BUS_H
9
10 #include <linux/device.h>
11 #include <linux/mod_devicetable.h>
12 #include <linux/intel-ish-client-if.h>
13
14 struct ishtp_cl;
15 struct ishtp_cl_device;
16 struct ishtp_device;
17 struct ishtp_msg_hdr;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 struct ishtp_cl_device {
38 struct device dev;
39 struct ishtp_device *ishtp_dev;
40 struct ishtp_fw_client *fw_client;
41 struct list_head device_link;
42 struct work_struct event_work;
43 void *driver_data;
44 int reference_count;
45 void (*event_cb)(struct ishtp_cl_device *device);
46 };
47
48 int ishtp_bus_new_client(struct ishtp_device *dev);
49 void ishtp_remove_all_clients(struct ishtp_device *dev);
50 int ishtp_cl_device_bind(struct ishtp_cl *cl);
51 void ishtp_cl_bus_rx_event(struct ishtp_cl_device *device);
52
53
54 int ishtp_send_msg(struct ishtp_device *dev,
55 struct ishtp_msg_hdr *hdr, void *msg,
56 void (*ipc_send_compl)(void *),
57 void *ipc_send_compl_prm);
58
59
60 int ishtp_write_message(struct ishtp_device *dev,
61 struct ishtp_msg_hdr *hdr,
62 void *buf);
63
64
65 int ishtp_use_dma_transfer(void);
66
67
68 void ishtp_bus_remove_all_clients(struct ishtp_device *ishtp_dev,
69 bool warm_reset);
70
71 void ishtp_recv(struct ishtp_device *dev);
72 void ishtp_reset_handler(struct ishtp_device *dev);
73 void ishtp_reset_compl_handler(struct ishtp_device *dev);
74
75 int ishtp_fw_cl_by_uuid(struct ishtp_device *dev, const guid_t *cuuid);
76 #endif