aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 21:07:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-02 21:07:04 -0400
commit7af4c727c7b6104f94f2ffc3d0899e75a9cc1e55 (patch)
treedc93871a09965c976b19247e4a8832dae0cc7e20 /include/linux
parent68fed41e0ff6c0332520a0d70ac05be2a7d9130e (diff)
parent4d6ca227c768b50b05cf183974b40abe444e9d0c (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/linux')
-rw-r--r--include/linux/hid.h5
-rw-r--r--include/linux/hiddev.h12
-rw-r--r--include/linux/i2c/i2c-hid.h6
3 files changed, 21 insertions, 2 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
35struct 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
35struct hid_device; 47struct hid_device;
36struct hid_usage; 48struct hid_usage;
37struct hid_field; 49struct 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
17struct 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 */
32struct i2c_hid_platform_data { 36struct 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 */