Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: intel-ish-hid: Add ishtp_get_connection_state() interface

Add the ishtp_get_connection_state() function for struct ishtp_cl, allowing
ishtp client drivers to retrieve the current connection state.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Zhang Lixu and committed by
Jiri Kosina
011aa2aa 0d30dae3

+7
+6
drivers/hid/intel-ish-hid/ishtp/client.c
··· 1261 1261 } 1262 1262 EXPORT_SYMBOL(ishtp_set_connection_state); 1263 1263 1264 + int ishtp_get_connection_state(struct ishtp_cl *cl) 1265 + { 1266 + return cl->state; 1267 + } 1268 + EXPORT_SYMBOL(ishtp_get_connection_state); 1269 + 1264 1270 void ishtp_cl_set_fw_client_id(struct ishtp_cl *cl, int fw_client_id) 1265 1271 { 1266 1272 cl->fw_client_id = fw_client_id;
+1
include/linux/intel-ish-client-if.h
··· 109 109 void ishtp_set_tx_ring_size(struct ishtp_cl *cl, int size); 110 110 void ishtp_set_rx_ring_size(struct ishtp_cl *cl, int size); 111 111 void ishtp_set_connection_state(struct ishtp_cl *cl, int state); 112 + int ishtp_get_connection_state(struct ishtp_cl *cl); 112 113 void ishtp_cl_set_fw_client_id(struct ishtp_cl *cl, int fw_client_id); 113 114 114 115 void ishtp_put_device(struct ishtp_cl_device *cl_dev);