summaryrefslogtreecommitdiffstats
path: root/drivers/hid/intel-ish-hid/ishtp/bus.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada2019-03-18 20:14:26 +0100
committerJiri Kosina2019-03-19 11:57:23 +0100
commit5f7224cf418511b9d3c40d35b098d15f9e4e7404 (patch)
treebe098e7a2d10ee9a84bc1b0063be0cfeee021bac /drivers/hid/intel-ish-hid/ishtp/bus.c
parentHID: intel-ish-hid: Add interface functions for struct ishtp_cl (diff)
downloadkernel-qcow2-linux-5f7224cf418511b9d3c40d35b098d15f9e4e7404.tar.gz
kernel-qcow2-linux-5f7224cf418511b9d3c40d35b098d15f9e4e7404.tar.xz
kernel-qcow2-linux-5f7224cf418511b9d3c40d35b098d15f9e4e7404.zip
HID: intel-ish-hid: Move functions related to bus and device
Move function idefinitions related to bus and device to common header file. Also create new function to get fw client id and move ish_hw_reset() from inline to exported function. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ishtp/bus.c')
-rw-r--r--drivers/hid/intel-ish-hid/ishtp/bus.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c
index 2ca65864192f..66a485a41481 100644
--- a/drivers/hid/intel-ish-hid/ishtp/bus.c
+++ b/drivers/hid/intel-ish-hid/ishtp/bus.c
@@ -171,6 +171,19 @@ struct ishtp_fw_client *ishtp_fw_cl_get_client(struct ishtp_device *dev,
EXPORT_SYMBOL(ishtp_fw_cl_get_client);
/**
+ * ishtp_get_fw_client_id() - Get fw client id
+ *
+ * This interface is used to reset HW get FW client id.
+ *
+ * Return: firmware client id.
+ */
+int ishtp_get_fw_client_id(struct ishtp_fw_client *fw_client)
+{
+ return fw_client->client_id;
+}
+EXPORT_SYMBOL(ishtp_get_fw_client_id);
+
+/**
* ishtp_fw_cl_by_id() - return index to fw_clients for client_id
* @dev: the ishtp device structure
* @client_id: fw client id to search
@@ -856,6 +869,19 @@ void *ishtp_trace_callback(struct ishtp_cl_device *cl_device)
EXPORT_SYMBOL(ishtp_trace_callback);
/**
+ * ish_hw_reset() - Call HW reset IPC callback
+ *
+ * This interface is used to reset HW in case of error.
+ *
+ * Return: value from IPC hw_reset callback
+ */
+int ish_hw_reset(struct ishtp_device *dev)
+{
+ return dev->ops->hw_reset(dev);
+}
+EXPORT_SYMBOL(ish_hw_reset);
+
+/**
* ishtp_bus_register() - Function to register bus
*
* This register ishtp bus