diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-02 21:07:04 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-02 21:07:04 -0400 |
| commit | 7af4c727c7b6104f94f2ffc3d0899e75a9cc1e55 (patch) | |
| tree | dc93871a09965c976b19247e4a8832dae0cc7e20 /include | |
| parent | 68fed41e0ff6c0332520a0d70ac05be2a7d9130e (diff) | |
| parent | 4d6ca227c768b50b05cf183974b40abe444e9d0c (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID subsystem updates from Jiri Kosina:
- The need for HID_QUIRK_NO_INIT_REPORTS per-device quirk has been
growing dramatically during past years, so the time has come to
switch over the default, and perform the pro-active reading only in
cases where it's really needed (multitouch, wacom).
The only place where this behavior is (in some form) preserved is
hiddev so that we don't introduce userspace-visible change of
behavior.
From Benjamin Tissoires
- HID++ support for power_supply / baterry reporting.
From Benjamin Tissoires and Bastien Nocera
- Vast improvements / rework of DS3 and DS4 in Sony driver.
From Roderick Colenbrander
- Improvment (in terms of getting closer to the Microsoft's
interpretation of slightly ambiguous specification) of logical range
interpretation in case null-state is set in the rdesc.
From Valtteri Heikkilä and Tomasz Kramkowski
- A lot of newly supported device IDs and small assorted fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (71 commits)
HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch
HID: asus: support backlight on USB keyboards
HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq
HID: wacom: generic: sync pad events only for actual packets
HID: sony: remove redundant check for -ve err
HID: sony: Make sure to unregister sensors on failure
HID: sony: Make DS4 bt poll interval adjustable
HID: sony: Set proper bit flags on DS4 output report
HID: sony: DS4 use brighter LED colors
HID: sony: Improve navigation controller axis/button mapping
HID: sony: Use DS3 MAC address as unique identifier on USB
HID: logitech-hidpp: add a sysfs file to tell we support power_supply
HID: logitech-hidpp: enable HID++ 1.0 battery reporting
HID: logitech-hidpp: add support for battery status for the K750
HID: logitech-hidpp: battery: provide CAPACITY_LEVEL
HID: logitech-hidpp: rename battery level into capacity
HID: logitech-hidpp: battery: provide ONLINE property
HID: logitech-hidpp: notify battery on connect
HID: logitech-hidpp: return an error if the queried feature is not present
HID: logitech-hidpp: create the battery for all types of HID++ devices
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hid.h | 5 | ||||
| -rw-r--r-- | include/linux/hiddev.h | 12 | ||||
| -rw-r--r-- | include/linux/i2c/i2c-hid.h | 6 | ||||
| -rw-r--r-- | include/uapi/linux/input-event-codes.h | 1 | ||||
| -rw-r--r-- | include/uapi/linux/input.h | 11 |
5 files changed, 30 insertions, 5 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 28f38e2b8f30..5be325d890d9 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -268,6 +268,8 @@ struct hid_item { | |||
| 268 | #define HID_CP_APPLICATIONLAUNCHBUTTONS 0x000c0180 | 268 | #define HID_CP_APPLICATIONLAUNCHBUTTONS 0x000c0180 |
| 269 | #define HID_CP_GENERICGUIAPPLICATIONCONTROLS 0x000c0200 | 269 | #define HID_CP_GENERICGUIAPPLICATIONCONTROLS 0x000c0200 |
| 270 | 270 | ||
| 271 | #define HID_DG_DEVICECONFIG 0x000d000e | ||
| 272 | #define HID_DG_DEVICESETTINGS 0x000d0023 | ||
| 271 | #define HID_DG_CONFIDENCE 0x000d0047 | 273 | #define HID_DG_CONFIDENCE 0x000d0047 |
| 272 | #define HID_DG_WIDTH 0x000d0048 | 274 | #define HID_DG_WIDTH 0x000d0048 |
| 273 | #define HID_DG_HEIGHT 0x000d0049 | 275 | #define HID_DG_HEIGHT 0x000d0049 |
| @@ -322,7 +324,7 @@ struct hid_item { | |||
| 322 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | 324 | #define HID_QUIRK_MULTI_INPUT 0x00000040 |
| 323 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 | 325 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 |
| 324 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 | 326 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 |
| 325 | #define HID_QUIRK_NO_INIT_INPUT_REPORTS 0x00000200 | 327 | /* 0x00000200 reserved for backward compatibility, was NO_INIT_INPUT_REPORTS */ |
| 326 | #define HID_QUIRK_ALWAYS_POLL 0x00000400 | 328 | #define HID_QUIRK_ALWAYS_POLL 0x00000400 |
| 327 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 329 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
| 328 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 | 330 | #define HID_QUIRK_SKIP_OUTPUT_REPORT_ID 0x00020000 |
| @@ -541,7 +543,6 @@ struct hid_device { /* device report descriptor */ | |||
| 541 | struct list_head inputs; /* The list of inputs */ | 543 | struct list_head inputs; /* The list of inputs */ |
| 542 | void *hiddev; /* The hiddev structure */ | 544 | void *hiddev; /* The hiddev structure */ |
| 543 | void *hidraw; | 545 | void *hidraw; |
| 544 | int minor; /* Hiddev minor number */ | ||
| 545 | 546 | ||
| 546 | int open; /* is the device open by anyone? */ | 547 | int open; /* is the device open by anyone? */ |
| 547 | char name[128]; /* Device name */ | 548 | char name[128]; /* Device name */ |
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index a5dd8148660b..921622222957 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
| @@ -32,6 +32,18 @@ | |||
| 32 | * In-kernel definitions. | 32 | * In-kernel definitions. |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | struct hiddev { | ||
| 36 | int minor; | ||
| 37 | int exist; | ||
| 38 | int open; | ||
| 39 | struct mutex existancelock; | ||
| 40 | wait_queue_head_t wait; | ||
| 41 | struct hid_device *hid; | ||
| 42 | struct list_head list; | ||
| 43 | spinlock_t list_lock; | ||
| 44 | bool initialized; | ||
| 45 | }; | ||
| 46 | |||
| 35 | struct hid_device; | 47 | struct hid_device; |
| 36 | struct hid_usage; | 48 | struct hid_usage; |
| 37 | struct hid_field; | 49 | struct hid_field; |
diff --git a/include/linux/i2c/i2c-hid.h b/include/linux/i2c/i2c-hid.h index 7aa901d92058..1fb088239d12 100644 --- a/include/linux/i2c/i2c-hid.h +++ b/include/linux/i2c/i2c-hid.h | |||
| @@ -14,9 +14,13 @@ | |||
| 14 | 14 | ||
| 15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | 16 | ||
| 17 | struct regulator; | ||
| 18 | |||
| 17 | /** | 19 | /** |
| 18 | * struct i2chid_platform_data - used by hid over i2c implementation. | 20 | * struct i2chid_platform_data - used by hid over i2c implementation. |
| 19 | * @hid_descriptor_address: i2c register where the HID descriptor is stored. | 21 | * @hid_descriptor_address: i2c register where the HID descriptor is stored. |
| 22 | * @supply: regulator for powering on the device. | ||
| 23 | * @post_power_delay_ms: delay after powering on before device is usable. | ||
| 20 | * | 24 | * |
| 21 | * Note that it is the responsibility of the platform driver (or the acpi 5.0 | 25 | * Note that it is the responsibility of the platform driver (or the acpi 5.0 |
| 22 | * driver, or the flattened device tree) to setup the irq related to the gpio in | 26 | * driver, or the flattened device tree) to setup the irq related to the gpio in |
| @@ -31,6 +35,8 @@ | |||
| 31 | */ | 35 | */ |
| 32 | struct i2c_hid_platform_data { | 36 | struct i2c_hid_platform_data { |
| 33 | u16 hid_descriptor_address; | 37 | u16 hid_descriptor_address; |
| 38 | struct regulator *supply; | ||
| 39 | int post_power_delay_ms; | ||
| 34 | }; | 40 | }; |
| 35 | 41 | ||
| 36 | #endif /* __LINUX_I2C_HID_H */ | 42 | #endif /* __LINUX_I2C_HID_H */ |
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 3af60ee69053..f5a8d96e1e09 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h | |||
| @@ -641,6 +641,7 @@ | |||
| 641 | * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) | 641 | * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) |
| 642 | */ | 642 | */ |
| 643 | #define KEY_DATA 0x277 | 643 | #define KEY_DATA 0x277 |
| 644 | #define KEY_ONSCREEN_KEYBOARD 0x278 | ||
| 644 | 645 | ||
| 645 | #define BTN_TRIGGER_HAPPY 0x2c0 | 646 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 646 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 647 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index e794f7bee22f..f561c0eb7d63 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
| @@ -61,9 +61,14 @@ struct input_id { | |||
| 61 | * Note that input core does not clamp reported values to the | 61 | * Note that input core does not clamp reported values to the |
| 62 | * [minimum, maximum] limits, such task is left to userspace. | 62 | * [minimum, maximum] limits, such task is left to userspace. |
| 63 | * | 63 | * |
| 64 | * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in | 64 | * The default resolution for main axes (ABS_X, ABS_Y, ABS_Z) |
| 65 | * units per millimeter (units/mm), resolution for rotational axes | 65 | * is reported in units per millimeter (units/mm), resolution |
| 66 | * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. | 66 | * for rotational axes (ABS_RX, ABS_RY, ABS_RZ) is reported |
| 67 | * in units per radian. | ||
| 68 | * When INPUT_PROP_ACCELEROMETER is set the resolution changes. | ||
| 69 | * The main axes (ABS_X, ABS_Y, ABS_Z) are then reported in | ||
| 70 | * in units per g (units/g) and in units per degree per second | ||
| 71 | * (units/deg/s) for rotational axes (ABS_RX, ABS_RY, ABS_RZ). | ||
| 67 | */ | 72 | */ |
| 68 | struct input_absinfo { | 73 | struct input_absinfo { |
| 69 | __s32 value; | 74 | __s32 value; |
