Commit ceecd1bf authored by Randy Dunlap's avatar Randy Dunlap Committed by Jiri Kosina

HID: correct kernel-doc notation in <linux/hid*.h>

Correct kernel-doc notation in HID header files (include/linux/hid*.h).
Add notation (comments) where it is missing.
Use the documented "Return:" notation for function return values.
Fix a few typos/spellos.
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 356006a6
...@@ -150,7 +150,7 @@ int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev, ...@@ -150,7 +150,7 @@ int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev,
* @info: return information about attribute after parsing report * @info: return information about attribute after parsing report
* *
* Parses report and returns the attribute information such as report id, * Parses report and returns the attribute information such as report id,
* field index, units and exponet etc. * field index, units and exponent etc.
*/ */
int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
u8 type, u8 type,
...@@ -167,7 +167,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, ...@@ -167,7 +167,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
* @is_signed: If true then fields < 32 bits will be sign-extended * @is_signed: If true then fields < 32 bits will be sign-extended
* *
* Issues a synchronous or asynchronous read request for an input attribute. * Issues a synchronous or asynchronous read request for an input attribute.
* Returns data upto 32 bits. * Return: data up to 32 bits.
*/ */
enum sensor_hub_read_flags { enum sensor_hub_read_flags {
...@@ -205,8 +205,9 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, ...@@ -205,8 +205,9 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
* @buffer: buffer to copy output * @buffer: buffer to copy output
* *
* Used to get a field in feature report. For example this can get polling * Used to get a field in feature report. For example this can get polling
* interval, sensitivity, activate/deactivate state. On success it returns * interval, sensitivity, activate/deactivate state.
* number of bytes copied to buffer. On failure, it returns value < 0. * Return: On success, it returns the number of bytes copied to buffer.
* On failure, it returns value < 0.
*/ */
int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
u32 field_index, int buffer_size, void *buffer); u32 field_index, int buffer_size, void *buffer);
......
...@@ -918,7 +918,7 @@ __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, ...@@ -918,7 +918,7 @@ __u32 hid_field_extract(const struct hid_device *hid, __u8 *report,
/** /**
* hid_device_io_start - enable HID input during probe, remove * hid_device_io_start - enable HID input during probe, remove
* *
* @hid - the device * @hid: the device
* *
* This should only be called during probe or remove and only be * This should only be called during probe or remove and only be
* called by the thread calling probe or remove. It will allow * called by the thread calling probe or remove. It will allow
...@@ -936,7 +936,7 @@ static inline void hid_device_io_start(struct hid_device *hid) { ...@@ -936,7 +936,7 @@ static inline void hid_device_io_start(struct hid_device *hid) {
/** /**
* hid_device_io_stop - disable HID input during probe, remove * hid_device_io_stop - disable HID input during probe, remove
* *
* @hid - the device * @hid: the device
* *
* Should only be called after hid_device_io_start. It will prevent * Should only be called after hid_device_io_start. It will prevent
* incoming packets from going to the driver for the duration of * incoming packets from going to the driver for the duration of
...@@ -1010,6 +1010,13 @@ static inline void hid_map_usage(struct hid_input *hidinput, ...@@ -1010,6 +1010,13 @@ static inline void hid_map_usage(struct hid_input *hidinput,
/** /**
* hid_map_usage_clear - map usage input bits and clear the input bit * hid_map_usage_clear - map usage input bits and clear the input bit
* *
* @hidinput: hidinput which we are interested in
* @usage: usage to fill in
* @bit: pointer to input->{}bit (out parameter)
* @max: maximal valid usage->code to consider later (out parameter)
* @type: input event type (EV_KEY, EV_REL, ...)
* @c: code which corresponds to this usage and type
*
* The same as hid_map_usage, except the @c bit is also cleared in supported * The same as hid_map_usage, except the @c bit is also cleared in supported
* bits (@bit). * bits (@bit).
*/ */
...@@ -1084,7 +1091,7 @@ static inline void hid_hw_request(struct hid_device *hdev, ...@@ -1084,7 +1091,7 @@ static inline void hid_hw_request(struct hid_device *hdev,
* @rtype: HID report type * @rtype: HID report type
* @reqtype: HID_REQ_GET_REPORT or HID_REQ_SET_REPORT * @reqtype: HID_REQ_GET_REPORT or HID_REQ_SET_REPORT
* *
* @return: count of data transfered, negative if error * Return: count of data transferred, negative if error
* *
* Same behavior as hid_hw_request, but with raw buffers instead. * Same behavior as hid_hw_request, but with raw buffers instead.
*/ */
...@@ -1106,7 +1113,7 @@ static inline int hid_hw_raw_request(struct hid_device *hdev, ...@@ -1106,7 +1113,7 @@ static inline int hid_hw_raw_request(struct hid_device *hdev,
* @buf: raw data to transfer * @buf: raw data to transfer
* @len: length of buf * @len: length of buf
* *
* @return: count of data transfered, negative if error * Return: count of data transferred, negative if error
*/ */
static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf, static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf,
size_t len) size_t len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment