summaryrefslogtreecommitdiff
path: root/lib/fdt_sw.c
diff options
context:
space:
mode:
authorEven Xu <even.xu@intel.com>2023-12-05 09:50:30 +0800
committerJiri Kosina <jkosina@suse.com>2023-12-06 11:33:45 +0100
commita3a44d2d3a5c5ff6e73c711db5b1911b5a676bb0 (patch)
treeffbd5af230ba94a9e10c6addfb5051dc61b7af33 /lib/fdt_sw.c
parent1f342790ad3c2456e15351829ad5d8919cccc03f (diff)
HID: Intel-ish-hid: Ishtp: Add helper functions for client connection
For every ishtp client driver during initialization state, the flow is: 1 - Allocate an ISHTP client instance 2 - Reserve a host id and link the client instance 3 - Search a firmware client using UUID and get related client information 4 - Bind firmware client id to the ISHTP client instance 5 - Set the state the ISHTP client instance to CONNECTING 6 - Send connect request to firmware 7 - Register event callback for messages from the firmware During deinitizalization state, the flow is: 9 - Set the state the ISHTP client instance to ISHTP_CL_DISCONNECTING 10 - Issue disconnect request to firmware 11 - Unlike the client instance 12 - Flush message queue 13 - Free ISHTP client instance Step 2-7 are identical to the steps of client driver initialization and driver reset flow, but reallocation of the RX/TX ring buffers can be avoided in reset flow. Also for step 9-12, they are identical to the steps of client driver failure handling after connect request, driver reset flow and driver removing. So, add two helper functions to simplify client driver code. ishtp_cl_establish_connection() ishtp_cl_destroy_connection() No functional changes are expected. Signed-off-by: Even Xu <even.xu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'lib/fdt_sw.c')
0 files changed, 0 insertions, 0 deletions