]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/hid/intel-ish-hid/ishtp-fw-loader.c
Merge branch 'for-5.14/intel-ish' into for-linus
[mirror_ubuntu-kernels.git] / drivers / hid / intel-ish-hid / ishtp-fw-loader.c
index 6cf59fd26ad784356923115c3c28054a344990b0..1b486f2627477cc458b0b136f868f1ecb0fc9e63 100644 (file)
 
 /**
  * enum ish_loader_commands -  ISH loader host commands.
- * LOADER_CMD_XFER_QUERY       Query the Shim firmware loader for
+ * @LOADER_CMD_XFER_QUERY:     Query the Shim firmware loader for
  *                             capabilities
- * LOADER_CMD_XFER_FRAGMENT    Transfer one firmware image fragment at a
+ * @LOADER_CMD_XFER_FRAGMENT:  Transfer one firmware image fragment at a
  *                             time. The command may be executed
  *                             multiple times until the entire firmware
  *                             image is downloaded to SRAM.
- * LOADER_CMD_START            Start executing the main firmware.
+ * @LOADER_CMD_START:          Start executing the main firmware.
  */
 enum ish_loader_commands {
        LOADER_CMD_XFER_QUERY = 0,
@@ -95,6 +95,7 @@ static int dma_buf_size_limit = 4 * PAGE_SIZE;
 /**
  * struct loader_msg_hdr - Header for ISH Loader commands.
  * @command:           LOADER_CMD* commands. Bit 7 is the response.
+ * @reserved:          Reserved space
  * @status:            Command response status. Non 0, is error
  *                     condition.
  *
@@ -173,16 +174,16 @@ struct loader_start {
  * struct response_info - Encapsulate firmware response related
  *                     information for passing between function
  *                     loader_cl_send() and process_recv() callback.
- * @data               Copy the data received from firmware here.
- * @max_size           Max size allocated for the @data buffer. If the
+ * @data:              Copy the data received from firmware here.
+ * @max_size:          Max size allocated for the @data buffer. If the
  *                     received data exceeds this value, we log an
  *                     error.
- * @size               Actual size of data received from firmware.
- * @error              Returns 0 for success, negative error code for a
+ * @size:              Actual size of data received from firmware.
+ * @error:             Returns 0 for success, negative error code for a
  *                     failure in function process_recv().
- * @received           Set to true on receiving a valid firmware
+ * @received:          Set to true on receiving a valid firmware
  *                     response to host command
- * @wait_queue         Wait queue for Host firmware loading where the
+ * @wait_queue:                Wait queue for Host firmware loading where the
  *                     client sends message to ISH firmware and waits
  *                     for response
  */
@@ -195,13 +196,13 @@ struct response_info {
        wait_queue_head_t wait_queue;
 };
 
-/**
+/*
  * struct ishtp_cl_data - Encapsulate per ISH-TP Client Data.
  * @work_ishtp_reset:  Work queue for reset handling.
  * @work_fw_load:      Work queue for host firmware loading.
- * @flag_retry         Flag for indicating host firmware loading should
+ * @flag_retry:                Flag for indicating host firmware loading should
  *                     be retried.
- * @retry_count                Count the number of retries.
+ * @retry_count:       Count the number of retries.
  *
  * This structure is used to store data per client.
  */
@@ -240,8 +241,8 @@ struct ishtp_cl_data {
 /**
  * get_firmware_variant() - Gets the filename of firmware image to be
  *                     loaded based on platform variant.
- * @client_data                Client data instance.
- * @filename           Returns firmware filename.
+ * @client_data:       Client data instance.
+ * @filename:          Returns firmware filename.
  *
  * Queries the firmware-name device property string.
  *
@@ -266,11 +267,11 @@ static int get_firmware_variant(struct ishtp_cl_data *client_data,
 /**
  * loader_cl_send()    Send message from host to firmware
  * @client_data:       Client data instance
- * @out_msg            Message buffer to be sent to firmware
- * @out_size           Size of out going message
- * @in_msg             Message buffer where the incoming data copied.
+ * @out_msg:           Message buffer to be sent to firmware
+ * @out_size:          Size of out going message
+ * @in_msg:            Message buffer where the incoming data copied.
  *                     This buffer is allocated by calling
- * @in_size            Max size of incoming message
+ * @in_size:           Max size of incoming message
  *
  * Return: Number of bytes copied in the in_msg on success, negative
  * error code on failure.
@@ -435,7 +436,7 @@ end:
 
 /**
  * loader_cl_event_cb() - bus driver callback for incoming message
- * @device:            Pointer to the ishtp client device for which this
+ * @cl_device:         Pointer to the ishtp client device for which this
  *                     message is targeted
  *
  * Remove the packet from the list and process the message by calling
@@ -455,7 +456,7 @@ static void loader_cl_event_cb(struct ishtp_cl_device *cl_device)
 /**
  * ish_query_loader_prop() -  Query ISH Shim firmware loader
  * @client_data:       Client data instance
- * @fw:                        Poiner to firmware data struct in host memory
+ * @fw:                        Pointer to firmware data struct in host memory
  * @fw_info:           Loader firmware properties
  *
  * This function queries the ISH Shim firmware loader for capabilities.
@@ -536,7 +537,7 @@ static int ish_query_loader_prop(struct ishtp_cl_data *client_data,
 }
 
 /**
- * ish_fw_xfer_ishtp() Loads ISH firmware using ishtp interface
+ * ish_fw_xfer_ishtp() Loads ISH firmware using ishtp interface
  * @client_data:       Client data instance
  * @fw:                        Pointer to firmware data struct in host memory
  *
@@ -733,7 +734,7 @@ end_err_dma_buf_release:
 }
 
 /**
- * ish_fw_start()      Start executing ISH main firmware
+ * ish_fw_start() -    Start executing ISH main firmware
  * @client_data:       client data instance
  *
  * This function sends message to Shim firmware loader to start
@@ -756,7 +757,7 @@ static int ish_fw_start(struct ishtp_cl_data *client_data)
 }
 
 /**
- * load_fw_from_host() Loads ISH firmware from host
+ * load_fw_from_host() Loads ISH firmware from host
  * @client_data:       Client data instance
  *
  * This function loads the ISH firmware to ISH SRAM and starts execution
@@ -1015,7 +1016,7 @@ static int loader_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
  *
  * Return: 0
  */
-static int loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
+static void loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
 {
        struct ishtp_cl_data *client_data;
        struct ishtp_cl *loader_ishtp_cl = ishtp_get_drvdata(cl_device);
@@ -1032,8 +1033,6 @@ static int loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
        cancel_work_sync(&client_data->work_ishtp_reset);
        loader_deinit(loader_ishtp_cl);
        ishtp_put_device(cl_device);
-
-       return 0;
 }
 
 /**