summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/mei_dev.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-03-27 15:29:55 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-29 15:44:12 (GMT)
commit3e8332952dedd2c17bb497e3909e3b6fbac10ce7 (patch)
treead405a421bb788fe421f62f23b38cba9a36b0ab7 /drivers/misc/mei/mei_dev.h
parent333e4ee0781bd0b5938da263c4bb7ab66a0d1b57 (diff)
downloadlinux-fsl-qoriq-3e8332952dedd2c17bb497e3909e3b6fbac10ce7.tar.xz
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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 7abb705d..cde5687 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,
uuid_le uuid, char *name);
void mei_cl_remove_device(struct mei_cl_device *device);
+int __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length);
+int __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length);
+
+/**
+ * struct mei_cl_transport_ops - MEI CL device transport ops
+ * This structure allows ME host clients to implement technology
+ * specific transport layers.
+ *
+ * @send: Tx hook for the device. This allows ME host clients to trap
+ * the device driver buffers before actually physically
+ * pushing it to the ME.
+ * @recv: Rx hook for the device. This allows ME host clients to trap the
+ * ME buffers before forwarding them to the device driver.
+ */
+struct mei_cl_transport_ops {
+ int (*send)(struct mei_cl_device *device, u8 *buf, size_t length);
+ int (*recv)(struct mei_cl_device *device, u8 *buf, size_t length);
+};
+
/**
* struct mei_cl_device - MEI device handle
* 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);
* @dev: linux driver model device pointer
* @uuid: me client uuid
* @cl: mei client
+ * @ops: ME transport ops
+ * @event_cb: Drivers register this callback to get asynchronous ME
+ * events (e.g. Rx buffer pending) notifications.
+ * @events: Events bitmask sent to the driver.
* @priv_data: client private data
*/
struct mei_cl_device {
@@ -285,6 +308,13 @@ struct mei_cl_device {
struct mei_cl *cl;
+ const struct mei_cl_transport_ops *ops;
+
+ struct work_struct event_work;
+ mei_cl_event_cb_t event_cb;
+ void *event_context;
+ unsigned long events;
+
void *priv_data;
};