diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 14:54:41 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 14:54:41 -0400 |
| commit | b42a362e6d10c342004b183defcb9940331b6737 (patch) | |
| tree | 193e7152500a7ff9c1b529532f4a5424414a137e /include/linux | |
| parent | 70b8e9eb3b50d8bded63f808b09c4844ef63c3b8 (diff) | |
| parent | de6c5070ad3956125fe8d407381c1b18f9749f93 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID update from Jiri Kosina:
- Wacom driver fixes/updates (device name generation improvements,
touch ring status support) from Jason Gerecke
- T100 touchpad support from Hans de Goede
- support for batteries driven by HID input reports, from Dmitry
Torokhov
- Arnd pointed out that driver_lock semaphore is superfluous, as driver
core already provides all the necessary concurency protection.
Removal patch from Binoy Jayan
- logical minimum numbering improvements in sensor-hub driver, from
Srinivas Pandruvada
- support for Microsoft Win8 Wireless Radio Controls extensions from
João Paulo Rechi Vita
- assorted small fixes and device ID additions
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (28 commits)
HID: prodikeys: constify snd_rawmidi_ops structures
HID: sensor: constify platform_device_id
HID: input: throttle battery uevents
HID: usbmouse: constify usb_device_id and fix space before '[' error
HID: usbkbd: constify usb_device_id and fix space before '[' error.
HID: hid-sensor-hub: Force logical minimum to 1 for power and report state
HID: wacom: Do not completely map WACOM_HID_WD_TOUCHRINGSTATUS usage
HID: asus: Add T100CHI bluetooth keyboard dock touchpad support
HID: ntrig: constify attribute_group structures.
HID: logitech-hidpp: constify attribute_group structures.
HID: sensor: constify attribute_group structures.
HID: multitouch: constify attribute_group structures.
HID: multitouch: use proper symbolic constant for 0xff310076 application
HID: multitouch: Support Asus T304UA media keys
HID: multitouch: Support HID_GD_WIRELESS_RADIO_CTLS
HID: input: optionally use device id in battery name
HID: input: map digitizer battery usage
HID: Remove the semaphore driver_lock
HID: wacom: add USB_HID dependency
HID: add ALWAYS_POLL quirk for Logitech 0xc077
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hid.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 6519cdc4c7d3..ab05a86269dc 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -173,6 +173,7 @@ struct hid_item { | |||
| 173 | #define HID_UP_LOGIVENDOR3 0xff430000 | 173 | #define HID_UP_LOGIVENDOR3 0xff430000 |
| 174 | #define HID_UP_LNVENDOR 0xffa00000 | 174 | #define HID_UP_LNVENDOR 0xffa00000 |
| 175 | #define HID_UP_SENSOR 0x00200000 | 175 | #define HID_UP_SENSOR 0x00200000 |
| 176 | #define HID_UP_ASUSVENDOR 0xff310000 | ||
| 176 | 177 | ||
| 177 | #define HID_USAGE 0x0000ffff | 178 | #define HID_USAGE 0x0000ffff |
| 178 | 179 | ||
| @@ -292,6 +293,7 @@ struct hid_item { | |||
| 292 | #define HID_DG_BARRELSWITCH2 0x000d005a | 293 | #define HID_DG_BARRELSWITCH2 0x000d005a |
| 293 | #define HID_DG_TOOLSERIALNUMBER 0x000d005b | 294 | #define HID_DG_TOOLSERIALNUMBER 0x000d005b |
| 294 | 295 | ||
| 296 | #define HID_VD_ASUS_CUSTOM_MEDIA_KEYS 0xff310076 | ||
| 295 | /* | 297 | /* |
| 296 | * HID report types --- Ouch! HID spec says 1 2 3! | 298 | * HID report types --- Ouch! HID spec says 1 2 3! |
| 297 | */ | 299 | */ |
| @@ -532,7 +534,6 @@ struct hid_device { /* device report descriptor */ | |||
| 532 | struct hid_report_enum report_enum[HID_REPORT_TYPES]; | 534 | struct hid_report_enum report_enum[HID_REPORT_TYPES]; |
| 533 | struct work_struct led_work; /* delayed LED worker */ | 535 | struct work_struct led_work; /* delayed LED worker */ |
| 534 | 536 | ||
| 535 | struct semaphore driver_lock; /* protects the current driver, except during input */ | ||
| 536 | struct semaphore driver_input_lock; /* protects the current driver */ | 537 | struct semaphore driver_input_lock; /* protects the current driver */ |
| 537 | struct device dev; /* device */ | 538 | struct device dev; /* device */ |
| 538 | struct hid_driver *driver; | 539 | struct hid_driver *driver; |
| @@ -548,16 +549,18 @@ struct hid_device { /* device report descriptor */ | |||
| 548 | * battery is non-NULL. | 549 | * battery is non-NULL. |
| 549 | */ | 550 | */ |
| 550 | struct power_supply *battery; | 551 | struct power_supply *battery; |
| 552 | __s32 battery_capacity; | ||
| 551 | __s32 battery_min; | 553 | __s32 battery_min; |
| 552 | __s32 battery_max; | 554 | __s32 battery_max; |
| 553 | __s32 battery_report_type; | 555 | __s32 battery_report_type; |
| 554 | __s32 battery_report_id; | 556 | __s32 battery_report_id; |
| 557 | bool battery_reported; | ||
| 555 | #endif | 558 | #endif |
| 556 | 559 | ||
| 557 | unsigned int status; /* see STAT flags above */ | 560 | unsigned int status; /* see STAT flags above */ |
| 558 | unsigned claimed; /* Claimed by hidinput, hiddev? */ | 561 | unsigned claimed; /* Claimed by hidinput, hiddev? */ |
| 559 | unsigned quirks; /* Various quirks the device can pull on us */ | 562 | unsigned quirks; /* Various quirks the device can pull on us */ |
| 560 | bool io_started; /* Protected by driver_lock. If IO has started */ | 563 | bool io_started; /* If IO has started */ |
| 561 | 564 | ||
| 562 | struct list_head inputs; /* The list of inputs */ | 565 | struct list_head inputs; /* The list of inputs */ |
| 563 | void *hiddev; /* The hiddev structure */ | 566 | void *hiddev; /* The hiddev structure */ |
| @@ -783,6 +786,17 @@ struct hid_ll_driver { | |||
| 783 | int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); | 786 | int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); |
| 784 | }; | 787 | }; |
| 785 | 788 | ||
| 789 | extern struct hid_ll_driver i2c_hid_ll_driver; | ||
| 790 | extern struct hid_ll_driver hidp_hid_driver; | ||
| 791 | extern struct hid_ll_driver uhid_hid_driver; | ||
| 792 | extern struct hid_ll_driver usb_hid_driver; | ||
| 793 | |||
| 794 | static inline bool hid_is_using_ll_driver(struct hid_device *hdev, | ||
| 795 | struct hid_ll_driver *driver) | ||
| 796 | { | ||
| 797 | return hdev->ll_driver == driver; | ||
| 798 | } | ||
| 799 | |||
| 786 | #define PM_HINT_FULLON 1<<5 | 800 | #define PM_HINT_FULLON 1<<5 |
| 787 | #define PM_HINT_NORMAL 1<<1 | 801 | #define PM_HINT_NORMAL 1<<1 |
| 788 | 802 | ||
