mirror of https://gitee.com/openkylin/linux.git
mei: export mei client device struct to external use
Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1d3ff76721
commit
dbac993f6a
|
@ -343,41 +343,6 @@ int mei_cl_bus_init(void);
|
||||||
void mei_cl_bus_exit(void);
|
void mei_cl_bus_exit(void);
|
||||||
struct mei_cl *mei_cl_bus_find_cl_by_uuid(struct mei_device *dev, uuid_le uuid);
|
struct mei_cl *mei_cl_bus_find_cl_by_uuid(struct mei_device *dev, uuid_le uuid);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* struct mei_cl_device - MEI device handle
|
|
||||||
* An mei_cl_device pointer is returned from mei_add_device()
|
|
||||||
* and links MEI bus clients to their actual ME host client pointer.
|
|
||||||
* Drivers for MEI devices will get an mei_cl_device pointer
|
|
||||||
* when being probed and shall use it for doing ME bus I/O.
|
|
||||||
*
|
|
||||||
* @dev: linux driver model device pointer
|
|
||||||
* @me_cl: me client
|
|
||||||
* @cl: mei client
|
|
||||||
* @name: device name
|
|
||||||
* @event_work: async work to execute event callback
|
|
||||||
* @event_cb: Drivers register this callback to get asynchronous ME
|
|
||||||
* events (e.g. Rx buffer pending) notifications.
|
|
||||||
* @event_context: event callback run context
|
|
||||||
* @events: Events bitmask sent to the driver.
|
|
||||||
* @priv_data: client private data
|
|
||||||
*/
|
|
||||||
struct mei_cl_device {
|
|
||||||
struct device dev;
|
|
||||||
|
|
||||||
struct mei_me_client *me_cl;
|
|
||||||
struct mei_cl *cl;
|
|
||||||
char name[MEI_CL_NAME_SIZE];
|
|
||||||
|
|
||||||
struct work_struct event_work;
|
|
||||||
mei_cl_event_cb_t event_cb;
|
|
||||||
void *event_context;
|
|
||||||
unsigned long events;
|
|
||||||
|
|
||||||
void *priv_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum mei_pg_event - power gating transition events
|
* enum mei_pg_event - power gating transition events
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,6 +7,42 @@
|
||||||
|
|
||||||
struct mei_cl_device;
|
struct mei_cl_device;
|
||||||
|
|
||||||
|
typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device,
|
||||||
|
u32 events, void *context);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct mei_cl_device - MEI device handle
|
||||||
|
* An mei_cl_device pointer is returned from mei_add_device()
|
||||||
|
* and links MEI bus clients to their actual ME host client pointer.
|
||||||
|
* Drivers for MEI devices will get an mei_cl_device pointer
|
||||||
|
* when being probed and shall use it for doing ME bus I/O.
|
||||||
|
*
|
||||||
|
* @dev: linux driver model device pointer
|
||||||
|
* @me_cl: me client
|
||||||
|
* @cl: mei client
|
||||||
|
* @name: device name
|
||||||
|
* @event_work: async work to execute event callback
|
||||||
|
* @event_cb: Drivers register this callback to get asynchronous ME
|
||||||
|
* events (e.g. Rx buffer pending) notifications.
|
||||||
|
* @event_context: event callback run context
|
||||||
|
* @events: Events bitmask sent to the driver.
|
||||||
|
* @priv_data: client private data
|
||||||
|
*/
|
||||||
|
struct mei_cl_device {
|
||||||
|
struct device dev;
|
||||||
|
|
||||||
|
struct mei_me_client *me_cl;
|
||||||
|
struct mei_cl *cl;
|
||||||
|
char name[MEI_CL_NAME_SIZE];
|
||||||
|
|
||||||
|
struct work_struct event_work;
|
||||||
|
mei_cl_event_cb_t event_cb;
|
||||||
|
void *event_context;
|
||||||
|
unsigned long events;
|
||||||
|
|
||||||
|
void *priv_data;
|
||||||
|
};
|
||||||
|
|
||||||
struct mei_cl_driver {
|
struct mei_cl_driver {
|
||||||
struct device_driver driver;
|
struct device_driver driver;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -28,8 +64,6 @@ void mei_cl_driver_unregister(struct mei_cl_driver *driver);
|
||||||
ssize_t mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length);
|
ssize_t mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length);
|
||||||
ssize_t mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length);
|
ssize_t mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length);
|
||||||
|
|
||||||
typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device,
|
|
||||||
u32 events, void *context);
|
|
||||||
int mei_cl_register_event_cb(struct mei_cl_device *device,
|
int mei_cl_register_event_cb(struct mei_cl_device *device,
|
||||||
mei_cl_event_cb_t read_cb, void *context);
|
mei_cl_event_cb_t read_cb, void *context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue