Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
interface.h File Reference
#include <linux/mei.h>
#include "mei_dev.h"

Go to the source code of this file.

Functions

void mei_read_slots (struct mei_device *dev, unsigned char *buffer, unsigned long buffer_length)
 
int mei_write_message (struct mei_device *dev, struct mei_msg_hdr *header, unsigned char *write_buffer, unsigned long write_length)
 
bool mei_hbuf_is_empty (struct mei_device *dev)
 
int mei_hbuf_empty_slots (struct mei_device *dev)
 
int mei_count_full_read_slots (struct mei_device *dev)
 
int mei_flow_ctrl_creds (struct mei_device *dev, struct mei_cl *cl)
 
int mei_wd_send (struct mei_device *dev)
 
int mei_wd_stop (struct mei_device *dev)
 
int mei_wd_host_init (struct mei_device *dev)
 
void mei_watchdog_register (struct mei_device *dev)
 
void mei_watchdog_unregister (struct mei_device *dev)
 
int mei_flow_ctrl_reduce (struct mei_device *dev, struct mei_cl *cl)
 
int mei_send_flow_control (struct mei_device *dev, struct mei_cl *cl)
 
int mei_disconnect (struct mei_device *dev, struct mei_cl *cl)
 
int mei_other_client_is_connecting (struct mei_device *dev, struct mei_cl *cl)
 
int mei_connect (struct mei_device *dev, struct mei_cl *cl)
 

Function Documentation

int mei_connect ( struct mei_device dev,
struct mei_cl cl 
)

mei_connect - sends connect message to fw.

: the device structure : private data of the file object

This function returns -EIO on write failure

Definition at line 385 of file interface.c.

int mei_count_full_read_slots ( struct mei_device dev)

mei_count_full_read_slots - counts read full slots.

: the device structure

returns -1(ESLOTS_OVERFLOW) if overflow, otherwise filled slots count

Definition at line 171 of file interface.c.

int mei_disconnect ( struct mei_device dev,
struct mei_cl cl 
)

mei_disconnect - sends disconnect message to fw.

: the device structure : private data of the file object

This function returns -EIO on write failure

Definition at line 352 of file interface.c.

int mei_flow_ctrl_creds ( struct mei_device dev,
struct mei_cl cl 
)

mei_flow_ctrl_creds - checks flow_control credentials.

: the device structure : private data of the file object

returns 1 if mei_flow_ctrl_creds >0, 0 - otherwise. -ENOENT if mei_cl is not present -EINVAL if single_recv_buf == 0

Definition at line 224 of file interface.c.

int mei_flow_ctrl_reduce ( struct mei_device dev,
struct mei_cl cl 
)

mei_flow_ctrl_reduce - reduces flow_control.

: the device structure : private data of the file object

Returns
0 on success -ENOENT when me client is not found -EINVAL when ctrl credits are <= 0

Definition at line 259 of file interface.c.

int mei_hbuf_empty_slots ( struct mei_device dev)

mei_hbuf_empty_slots - counts write empty slots.

: the device structure

returns -1(ESLOTS_OVERFLOW) if overflow, otherwise empty slots count

Definition at line 98 of file interface.c.

bool mei_hbuf_is_empty ( struct mei_device dev)

mei_hbuf_is_empty - checks if host buffer is empty.

: the device structure

returns true if empty, false - otherwise.

Definition at line 86 of file interface.c.

int mei_other_client_is_connecting ( struct mei_device dev,
struct mei_cl cl 
)

mei_other_client_is_connecting - checks if other client with the same client id is connected.

: the device structure : private data of the file object

returns 1 if other client is connected, 0 - otherwise.

Definition at line 328 of file interface.c.

void mei_read_slots ( struct mei_device dev,
unsigned char buffer,
unsigned long  buffer_length 
)

mei_read_slots - reads a message from mei device.

: the device structure : message buffer will be written : message size will be read

Definition at line 197 of file interface.c.

int mei_send_flow_control ( struct mei_device dev,
struct mei_cl cl 
)

mei_send_flow_control - sends flow control to fw.

: the device structure : private data of the file object

This function returns -EIO on write failure

Definition at line 292 of file interface.c.

void mei_watchdog_register ( struct mei_device dev)

Definition at line 358 of file wd.c.

void mei_watchdog_unregister ( struct mei_device dev)

Definition at line 373 of file wd.c.

int mei_wd_host_init ( struct mei_device dev)

mei_wd_host_init - connect to the watchdog client

: the device structure returns -ENENT if wd client cannot be found -EIO if write has failed 0 on success

Definition at line 63 of file wd.c.

int mei_wd_send ( struct mei_device dev)

mei_wd_send - sends watch dog message to fw.

: the device structure

returns 0 if success, -EIO when message send fails -EINVAL when invalid message is to be sent

Definition at line 102 of file wd.c.

int mei_wd_stop ( struct mei_device dev)

mei_wd_stop - sends watchdog stop message to fw.

: the device structure : indicate if to keep the timeout value

returns 0 if success, -EIO when message send fails -EINVAL when invalid message is to be sent

Definition at line 132 of file wd.c.

int mei_write_message ( struct mei_device dev,
struct mei_msg_hdr header,
unsigned char buf,
unsigned long  length 
)

mei_write_message - writes a message to mei device.

: the device structure : header of message : message buffer will be written : message size will be written

This function returns -EIO if write has failed

Definition at line 122 of file interface.c.