diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 14:52:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 14:52:22 -0800 |
commit | 69aea9d2843669387d100e353b5113d1adc9502f (patch) | |
tree | 16e4c92ec5a08d42aaf7b7b297164785ae5db3d2 /include | |
parent | c3476d2f2b1dcda2f089412e5844bf4f93c19229 (diff) | |
parent | 00522de2f9f184946d5c4384100f48270f88c45d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
- support for "Unified Battery" feature on Logitech devices from Filipe
LaĆns
- power management improvements for intel-ish driver from Zhang Lixu
- support for Goodix devices from Douglas Anderson
- improved handling of generic HID keyboard in order to make it easier
for userspace to figure out the details of the device, from Dmitry
Torokhov
- Playstation DualSense support from Roderick Colenbrander
- other assorted small fixes and device ID additions.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (49 commits)
HID: playstation: add DualSense player LED support.
HID: playstation: add microphone mute support for DualSense.
HID: playstation: add initial DualSense lightbar support.
HID: wacom: Ignore attempts to overwrite the touch_max value from HID
HID: playstation: fix array size comparison (off-by-one)
HID: playstation: fix unused variable in ps_battery_get_property.
HID: playstation: report DualSense hardware and firmware version.
HID: playstation: add DualSense classic rumble support.
HID: playstation: add DualSense Bluetooth support.
HID: playstation: track devices in list.
HID: playstation: add DualSense accelerometer and gyroscope support.
HID: playstation: add DualSense touchpad support.
HID: playstation: add DualSense battery support.
HID: playstation: use DualSense MAC address as unique identifier.
HID: playstation: initial DualSense USB support.
HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch 10E
HID: Ignore battery for Elan touchscreen on HP Spectre X360 15-df0xxx
HID: logitech-dj: add support for the new lightspeed connection iteration
HID: intel-ish-hid: ipc: Add Tiger Lake H PCI device ID
HID: logitech-dj: add support for keyboard events in eQUAD step 4 Gaming
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hid-sensor-hub.h | 9 | ||||
-rw-r--r-- | include/linux/hid.h | 15 | ||||
-rw-r--r-- | include/linux/platform_data/i2c-hid.h | 41 |
3 files changed, 16 insertions, 49 deletions
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index 46bcef380446..763802b2b8f9 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h @@ -150,7 +150,7 @@ int sensor_hub_remove_callback(struct hid_sensor_hub_device *hsdev, * @info: return information about attribute after parsing report * * 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, u8 type, @@ -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 * * 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 { @@ -205,8 +205,9 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, * @buffer: buffer to copy output * * Used to get a field in feature report. For example this can get polling -* interval, sensitivity, activate/deactivate state. On success it returns -* number of bytes copied to buffer. On failure, it returns value < 0. +* interval, sensitivity, activate/deactivate state. +* 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, u32 field_index, int buffer_size, void *buffer); diff --git a/include/linux/hid.h b/include/linux/hid.h index c39d71eb1fd0..ef702b3f56e3 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -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 - the device + * @hid: the device * * This should only be called during probe or remove and only be * 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) { /** * 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 * 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, /** * 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 * bits (@bit). */ @@ -1084,7 +1091,7 @@ static inline void hid_hw_request(struct hid_device *hdev, * @rtype: HID report type * @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. */ @@ -1106,7 +1113,7 @@ static inline int hid_hw_raw_request(struct hid_device *hdev, * @buf: raw data to transfer * @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, size_t len) diff --git a/include/linux/platform_data/i2c-hid.h b/include/linux/platform_data/i2c-hid.h deleted file mode 100644 index c628bb5e1061..000000000000 --- a/include/linux/platform_data/i2c-hid.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * HID over I2C protocol implementation - * - * Copyright (c) 2012 Benjamin Tissoires <benjamin.tissoires@gmail.com> - * Copyright (c) 2012 Ecole Nationale de l'Aviation Civile, France - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive for - * more details. - */ - -#ifndef __LINUX_I2C_HID_H -#define __LINUX_I2C_HID_H - -#include <linux/regulator/consumer.h> -#include <linux/types.h> - -/** - * struct i2chid_platform_data - used by hid over i2c implementation. - * @hid_descriptor_address: i2c register where the HID descriptor is stored. - * @supplies: regulators for powering on the device. - * @post_power_delay_ms: delay after powering on before device is usable. - * - * Note that it is the responsibility of the platform driver (or the acpi 5.0 - * driver, or the flattened device tree) to setup the irq related to the gpio in - * the struct i2c_board_info. - * The platform driver should also setup the gpio according to the device: - * - * A typical example is the following: - * irq = gpio_to_irq(intr_gpio); - * hkdk4412_i2c_devs5[0].irq = irq; // store the irq in i2c_board_info - * gpio_request(intr_gpio, "elan-irq"); - * s3c_gpio_setpull(intr_gpio, S3C_GPIO_PULL_UP); - */ -struct i2c_hid_platform_data { - u16 hid_descriptor_address; - struct regulator_bulk_data supplies[2]; - int post_power_delay_ms; -}; - -#endif /* __LINUX_I2C_HID_H */ |