diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-27 11:29:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-29 11:44:12 -0400 |
commit | 3e8332952dedd2c17bb497e3909e3b6fbac10ce7 (patch) | |
tree | ad405a421bb788fe421f62f23b38cba9a36b0ab7 /drivers/misc/mei/mei_dev.h | |
parent | 333e4ee0781bd0b5938da263c4bb7ab66a0d1b57 (diff) |
mei: bus: Initial implementation for I/O routines
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 7abb705ddf3f..cde5687039f3 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -268,6 +268,25 @@ struct mei_cl_device *mei_cl_add_device(struct mei_device *dev, | |||
268 | uuid_le uuid, char *name); | 268 | uuid_le uuid, char *name); |
269 | void mei_cl_remove_device(struct mei_cl_device *device); | 269 | void mei_cl_remove_device(struct mei_cl_device *device); |
270 | 270 | ||
271 | int __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length); | ||
272 | int __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length); | ||
273 | |||
274 | /** | ||
275 | * struct mei_cl_transport_ops - MEI CL device transport ops | ||
276 | * This structure allows ME host clients to implement technology | ||
277 | * specific transport layers. | ||
278 | * | ||
279 | * @send: Tx hook for the device. This allows ME host clients to trap | ||
280 | * the device driver buffers before actually physically | ||
281 | * pushing it to the ME. | ||
282 | * @recv: Rx hook for the device. This allows ME host clients to trap the | ||
283 | * ME buffers before forwarding them to the device driver. | ||
284 | */ | ||
285 | struct mei_cl_transport_ops { | ||
286 | int (*send)(struct mei_cl_device *device, u8 *buf, size_t length); | ||
287 | int (*recv)(struct mei_cl_device *device, u8 *buf, size_t length); | ||
288 | }; | ||
289 | |||
271 | /** | 290 | /** |
272 | * struct mei_cl_device - MEI device handle | 291 | * struct mei_cl_device - MEI device handle |
273 | * An mei_cl_device pointer is returned from mei_add_device() | 292 | * An mei_cl_device pointer is returned from mei_add_device() |
@@ -278,6 +297,10 @@ void mei_cl_remove_device(struct mei_cl_device *device); | |||
278 | * @dev: linux driver model device pointer | 297 | * @dev: linux driver model device pointer |
279 | * @uuid: me client uuid | 298 | * @uuid: me client uuid |
280 | * @cl: mei client | 299 | * @cl: mei client |
300 | * @ops: ME transport ops | ||
301 | * @event_cb: Drivers register this callback to get asynchronous ME | ||
302 | * events (e.g. Rx buffer pending) notifications. | ||
303 | * @events: Events bitmask sent to the driver. | ||
281 | * @priv_data: client private data | 304 | * @priv_data: client private data |
282 | */ | 305 | */ |
283 | struct mei_cl_device { | 306 | struct mei_cl_device { |
@@ -285,6 +308,13 @@ struct mei_cl_device { | |||
285 | 308 | ||
286 | struct mei_cl *cl; | 309 | struct mei_cl *cl; |
287 | 310 | ||
311 | const struct mei_cl_transport_ops *ops; | ||
312 | |||
313 | struct work_struct event_work; | ||
314 | mei_cl_event_cb_t event_cb; | ||
315 | void *event_context; | ||
316 | unsigned long events; | ||
317 | |||
288 | void *priv_data; | 318 | void *priv_data; |
289 | }; | 319 | }; |
290 | 320 | ||