mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomas Winkler <tomas.winkler@intel.com>
To: gregkh@linuxfoundation.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
	Tomas Winkler <tomas.winkler@intel.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: [char-misc-next 10/11] mei: export mei client device struct to external use
Date: Thu,  7 May 2015 15:54:07 +0300	[thread overview]
Message-ID: <1431003248-3164-10-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <1431003248-3164-1-git-send-email-tomas.winkler@intel.com>

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/mei_dev.h | 35 -----------------------------------
 include/linux/mei_cl_bus.h | 38 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 609a2d2c2dba..70a644f688b0 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -343,41 +343,6 @@ int mei_cl_bus_init(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_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
  *
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h
index 0819d36a3a74..a16b1f9c1aca 100644
--- a/include/linux/mei_cl_bus.h
+++ b/include/linux/mei_cl_bus.h
@@ -7,6 +7,42 @@
 
 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 device_driver driver;
 	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_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,
 			  mei_cl_event_cb_t read_cb, void *context);
 
-- 
2.1.0


  parent reply	other threads:[~2015-05-07 12:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 12:53 [char-misc-next 01/11] mei: consume flow control on the first chunk of writing Tomas Winkler
2015-05-07 12:53 ` [char-misc-next 02/11] mei: request autosuspend at the end of write Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 03/11] mei: add also write waiting list to runtime pm blockers Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 04/11] uuid: extract macros for assigning raw arrays Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 05/11] mei: bus: report also uuid in module alias Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 06/11] mei: bus: add name and uuid into device attributes Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 07/11] NFC: mei_phy: move all nfc logic from mei driver to nfc Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 08/11] mei: bus: kill mei_cl_ops Tomas Winkler
2015-05-07 12:54 ` [char-misc-next 09/11] NFC: mei_phy: adjust mei nfc header according the spec Tomas Winkler
2015-05-07 12:54 ` Tomas Winkler [this message]
2015-05-07 12:54 ` [char-misc-next 11/11] mei: revamp mei bus code Tomas Winkler
2015-05-24 18:19   ` Greg KH
2015-05-24 21:29     ` Winkler, Tomas
2015-05-25  1:46       ` Greg KH
2015-05-25  4:40         ` Winkler, Tomas
2015-05-25 16:20           ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431003248-3164-10-git-send-email-tomas.winkler@intel.com \
    --to=tomas.winkler@intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®