diff options
Diffstat (limited to 'drivers/misc/mei/interface.h')
| -rw-r--r-- | drivers/misc/mei/interface.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/misc/mei/interface.h b/drivers/misc/mei/interface.h index ddff5d16616f..fb5c7db4723b 100644 --- a/drivers/misc/mei/interface.h +++ b/drivers/misc/mei/interface.h | |||
| @@ -41,14 +41,28 @@ int mei_write_message(struct mei_device *dev, | |||
| 41 | unsigned char *write_buffer, | 41 | unsigned char *write_buffer, |
| 42 | unsigned long write_length); | 42 | unsigned long write_length); |
| 43 | 43 | ||
| 44 | int mei_host_buffer_is_empty(struct mei_device *dev); | 44 | bool mei_hbuf_is_empty(struct mei_device *dev); |
| 45 | |||
| 46 | int mei_hbuf_empty_slots(struct mei_device *dev); | ||
| 47 | |||
| 48 | static inline size_t mei_hbuf_max_data(const struct mei_device *dev) | ||
| 49 | { | ||
| 50 | return dev->hbuf_depth * sizeof(u32) - sizeof(struct mei_msg_hdr); | ||
| 51 | } | ||
| 52 | |||
| 53 | /* get slots (dwords) from a message length + header (bytes) */ | ||
| 54 | static inline unsigned char mei_data2slots(size_t length) | ||
| 55 | { | ||
| 56 | return DIV_ROUND_UP(sizeof(struct mei_msg_hdr) + length, 4); | ||
| 57 | } | ||
| 45 | 58 | ||
| 46 | int mei_count_full_read_slots(struct mei_device *dev); | 59 | int mei_count_full_read_slots(struct mei_device *dev); |
| 47 | 60 | ||
| 48 | int mei_count_empty_write_slots(struct mei_device *dev); | ||
| 49 | 61 | ||
| 50 | int mei_flow_ctrl_creds(struct mei_device *dev, struct mei_cl *cl); | 62 | int mei_flow_ctrl_creds(struct mei_device *dev, struct mei_cl *cl); |
| 51 | 63 | ||
| 64 | |||
| 65 | |||
| 52 | int mei_wd_send(struct mei_device *dev); | 66 | int mei_wd_send(struct mei_device *dev); |
| 53 | int mei_wd_stop(struct mei_device *dev, bool preserve); | 67 | int mei_wd_stop(struct mei_device *dev, bool preserve); |
| 54 | int mei_wd_host_init(struct mei_device *dev); | 68 | int mei_wd_host_init(struct mei_device *dev); |
