0001
0002
0003
0004
0005
0006
0007 #ifndef _LINUX_ISHTP_CL_BUS_H
0008 #define _LINUX_ISHTP_CL_BUS_H
0009
0010 #include <linux/device.h>
0011 #include <linux/mod_devicetable.h>
0012 #include <linux/intel-ish-client-if.h>
0013
0014 struct ishtp_cl;
0015 struct ishtp_cl_device;
0016 struct ishtp_device;
0017 struct ishtp_msg_hdr;
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 struct ishtp_cl_device {
0038 struct device dev;
0039 struct ishtp_device *ishtp_dev;
0040 struct ishtp_fw_client *fw_client;
0041 struct list_head device_link;
0042 struct work_struct event_work;
0043 void *driver_data;
0044 int reference_count;
0045 void (*event_cb)(struct ishtp_cl_device *device);
0046 };
0047
0048 int ishtp_bus_new_client(struct ishtp_device *dev);
0049 void ishtp_remove_all_clients(struct ishtp_device *dev);
0050 int ishtp_cl_device_bind(struct ishtp_cl *cl);
0051 void ishtp_cl_bus_rx_event(struct ishtp_cl_device *device);
0052
0053
0054 int ishtp_send_msg(struct ishtp_device *dev,
0055 struct ishtp_msg_hdr *hdr, void *msg,
0056 void (*ipc_send_compl)(void *),
0057 void *ipc_send_compl_prm);
0058
0059
0060 int ishtp_write_message(struct ishtp_device *dev,
0061 struct ishtp_msg_hdr *hdr,
0062 void *buf);
0063
0064
0065 int ishtp_use_dma_transfer(void);
0066
0067
0068 void ishtp_bus_remove_all_clients(struct ishtp_device *ishtp_dev,
0069 bool warm_reset);
0070
0071 void ishtp_recv(struct ishtp_device *dev);
0072 void ishtp_reset_handler(struct ishtp_device *dev);
0073 void ishtp_reset_compl_handler(struct ishtp_device *dev);
0074
0075 int ishtp_fw_cl_by_uuid(struct ishtp_device *dev, const guid_t *cuuid);
0076 #endif