summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-4.16/hid-quirks-cleanup/_base' into for-linusJiri Kosina2018-01-311-876/+56Star
|\ | | | | | | | | | | This series from Benjamin Tissoires finally removes one of the big PITAs in the hid-core, which is the absolute need of having added all the new device IDs into the horrid hid_have_special_driver[]
| * HID: core: remove the absolute need of hid_have_special_driver[]Benjamin Tissoires2017-11-211-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most HID devices behave properly when they are used with hid-generic. Since kernel v4.12, we do not poll for input reports at plug in, so hid-generic should behave properly with all HID devices. There has been a long standing list of HID devices that have a special driver. It used to be just a few, but with time, this list went too big, and we can not ask users to know which HID special driver will pick up their device. We can teach hid-generic to be nice with others. If a device is not explicitly marked with HID_QUIRK_HAVE_SPECIAL_DRIVER, we can allow hid-generic to pick up the device as long as no other loaded HID driver will match the device. When the special driver appears, hid-generic can step back and let the special driver handling the device. In case this special driver is removed, this good old pal of hid-generic will rebind to the device. This basically makes the list hid_have_special_driver[] useless. It still allows to not see a hid-generic driver bound and removed during boot, so we can keep it around. This will also help other people to have a special HID driver without the need of recompiling hid-core. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: core: move the list of ignored devices in hid-quirks.cBenjamin Tissoires2017-11-211-309/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Better having all the devices quirks in one place. Note that this change introduces an initial lookup for the device in hid_gets_squirk(), which should not theoretically be required, but which actually allows to not have to reparse the list of ignored devices if we call hid_lookup_quirks twice. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: quirks: move the list of special devices into a quirkBenjamin Tissoires2017-11-211-536/+1Star
| | | | | | | | | | | | | | | | | | | | | | It is better to centralize the information of special devices in one single file. Instead of manually parsing the list of devices that have a special driver or those that need to be ignored, introduce HID_QUIRK_HAVE_SPECIAL_DRIVER and set the correct quirks while fetching those quirks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: core: move the dynamic quirks handling in coreBenjamin Tissoires2017-11-211-3/+7
| | | | | | | | | | | | | | | | | | usbhid has a list of dynamic quirks in addition to a list of static quirks. There is not much USB specific in that, so move this part of the module in core so we can have one central place for quirks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: core: lower log level for unknown main item tags to warningsHans de Goede2017-12-071-1/+1
|/ | | | | | | | | | | | | | | Given all the effort distros have done with splash-screens to give users a nice clean boot experience, we really want dmesg --level=err to not print anything unless there is a real problem with either the hardware or the kernel. Buggy HID descriptors unfortunately happen all too often, so lower the log level to warning keep the console clear of error messages such as: [ 441.079664] apple 0005:05AC:0239.0003: unknown main item tag 0x0 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-4.15/upstream' into for-linusJiri Kosina2017-11-151-1/+1
|\ | | | | | | | | | | | | | | | | - cp2112: GPIO error handling and Kconfig fixes from Sébastien Szymanski - i2c-hid: fixup / quirk for Apollo-Lake based laptops, from Hans de Goede - Input/Core: add eraser tool support, from Ping Cheng - small assorted code fixes Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: make device_attribute constBhumika Goyal2017-09-061-1/+1
| | | | | | | | | | | | | | | | | | Make this const as it is only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-4.15/asus' into for-linusJiri Kosina2017-11-151-1/+1
|\ \ | | | | | | | | | | | | - Asus laptop fixes (fn keys, backlight), from Mustafa Kuscu and Maxime Bellengé
| * | HID: asus: Add support for Fn keys on Asus ROG G752Maxime Bellengé2017-09-161-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Fn keys on Asus ROG G752 laptop. The report descriptor is broken so I fixed it. Tested on an Asus G752VT. Resent fix white space fixes Signed-off-by: Maxime Bellengé <maxime.bellenge@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-4.15/alps' into for-linusJiri Kosina2017-11-151-0/+3
|\ \ | | | | | | | | | | | | - New ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio and HP Elite book x360) support from Masaki Ota
| * | HID: alps: add new U1 device IDMasaki Ota2017-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add new U1 device Product ID This device is used on HP Elite book x360 series. [jkosina@suse.cz: update changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: alps: add support for Alps T4 Touchpad deviceMasaki Ota2017-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Define T4 device specification value for support T4 device. - Creeate "t4_contact_data" and "t4_input_report" structure for decoding and storing T4-specific data - Create "t4_calc_check_sum()" function for calculating checksum value to send to the device. T4 needs to send this value when reading or writing device address value. - Create "t4_read_write_register()" function for reading and writing device address value. - Create "t4_raw_event()" function for decodin XYZ, palm and button data. - Replace "MAX_TOUCHES" fixed variable to "max_fingers" variable. - Add T4 devuce product ID. (0x120C) T4 device is used on HP EliteBook 1000 series and Zbook Stduio [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: Add ID 044f:b605 ThrustMaster, Inc. force feedback Racing WheelViktor Chapliev2017-11-071-0/+1
|/ / | | | | | | | | | | | | Add ID 044f:b605 ThrustMaster, Inc. force feedback Racing Wheel Signed-off-by: Viktor Chapliev <viktor-tch@yandex.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* / HID: hid-elecom: extend to fix descriptor for HUGE trackballAlex Manoussakis2017-10-111-0/+2
|/ | | | | | | | | | | In addition to DEFT, Elecom introduced a larger trackball called HUGE, in both wired (M-HT1URBK) and wireless (M-HT1DRBK) versions. It has the same buttons and behavior as the DEFT. This patch adds the two relevant USB IDs to enable operation of the three Fn buttons on the top of the device. Cc: Diego Elio Petteno <flameeyes@flameeyes.eu> Signed-off-by: Alex Manoussakis <amanou@gnu.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-4.14/driver-lock-removal' into for-linusJiri Kosina2017-09-051-11/+4Star
|\ | | | | | | | | | | - Arnd pointed out that driver_lock semaphore is superfluous, as driver core already provides all the necessary concurency protection. Removal patch from Binoy Jayan
| * HID: Remove the semaphore driver_lockBinoy Jayan2017-08-011-11/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | The semaphore 'driver_lock' is used as a simple mutex, and also unnecessary as suggested by Arnd. Hence removing it, as the concurrency between the probe and remove is already handled in the driver core. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-4.14/asus' into for-linusJiri Kosina2017-09-051-0/+1
|\ \ | |/ |/| | | - T100 touchpad support from Hans de Goede
| * HID: asus: Add T100CHI bluetooth keyboard dock special keys mappingHans de Goede2017-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Asus Transformer T100CHI comes with a Bluetooth keyboard dock which uses the same 0xff31 Asus vendor HUT page as other Asus keyboards. This commit adds its device-id to hid-asus and fixes an issue in the descriptor of the 0xff31 Usage, which together fixes the special keys on this keyboard not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: ortek: add one more buggy deviceBenjamin Tissoires2017-07-241-0/+1
|/ | | | | | | | | The iHome keypad also requires the same tweak we are doing for other Ortek devices. Reported-by: Mairin Duffy <duffy@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2017-07-101-3/+99
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - open/close tracking improvements from Dmitry Torokhov - battery support improvements in Wacom driver from Jason Gerecke - Win8 support fixes from Benjamin Tissories and Hans de Geode - misc fixes to Intel-ISH driver from Arnd Bergmann - support for quite a few new devices and small assorted fixes here and there * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (35 commits) HID: intel-ish-hid: Enable Gemini Lake ish driver HID: intel-ish-hid: Enable Cannon Lake ish driver HID: wacom: fix mistake in printk HID: multitouch: optimize the sticky fingers timer HID: multitouch: fix rare Win 8 cases when the touch up event gets missing HID: multitouch: use BIT macro HID: Add driver for Retrode2 joypad adapter HID: multitouch: Add support for Google Rose Touchpad HID: multitouch: Support PTP Stick and Touchpad device HID: core: don't use negative operands when shift HID: apple: Use country code to detect ISO keyboards HID: remove no longer used hid->open field greybus: hid: remove custom locking from gb_hid_open/close HID: usbhid: remove custom locking from usbhid_open/close HID: i2c-hid: remove custom locking from i2c_hid_open/close HID: serialize hid_hw_open and hid_hw_close HID: usbhid: do not rely on hid->open when deciding to do IO HID: hiddev: use hid_hw_power instead of usbhid_get/put_power HID: hiddev: use hid_hw_open/close instead of usbhid_open/close HID: asus: Add support for Zen AiO MD-5110 keyboard ...
| *-------. Merge branches 'for-4.13/multitouch', 'for-4.13/retrode', ↵Jiri Kosina2017-07-101-1/+93
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'for-4.13/transport-open-close-consolidation', 'for-4.13/upstream' and 'for-4.13/wacom' into for-linus
| | | | | * | HID: core: don't use negative operands when shiftAndy Shevchenko2017-06-131-1/+1
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent C standard in 6.5.7 paragraph 4 defines that operands for bitwise shift operators should be non-negative, otherwise it's an undefined behaviour. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | HID: serialize hid_hw_open and hid_hw_closeDmitry Torokhov2017-06-081-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HID transport drivers either re-implement exactly the same logic (usbhid, i2c-hid) or forget to implement it (usbhid) which causes issues when the same device is accessed via multiple interfaces (for example input device through evdev and also hidraw). Let's muve the locking logic into HID core to make sure the serialized behavior is always enforced. Also let's uninline and move hid_hw_start() and hid_hw_stop() into hid-core as hid_hw_start() is somewhat large and do not believe we get any benefit from these two being inline. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | HID: Add driver for Retrode2 joypad adapterBastien Nocera2017-06-221-0/+3
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver does 2 things: - Apply the MULTI_INPUT quirk to create separate joypad device nodes for each one of the 4 connectors. - Rename the input devices so that their names are different, and allow users to recognise which device corresponds to which physical port, including the SNES (Mario Paint) Mouse. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | |
| | \ \ \
| *-. \ \ \ Merge branches 'for-4.13/ish' and 'for-4.13/ite' into for-linusJiri Kosina2017-07-101-0/+3
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-core.c
| | | * | | HID: ite: Add hid-ite driverHans de Goede2017-05-111-0/+1
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ITE8595 keyboard uses the HID_GD_RFKILL_BTN usage code from the Wireless Radio Controls Application Collection Microsoft has defined for Windows 8 and later. However it has a quirk, when the rfkill hotkey is pressed it does generate a report for the collection, but the reported value is always 0. Luckily it is the only button in this collection / report, and it sends a report on release only, so receiving a report means the button was pressed. This commit adds a hid-ite driver which watches for the Wireless Radio Controls Application Collection report and then reports a KEY_RFKILL event, ignoring the value, making the rfkill on this keyboard work. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | |
| | \ \ \
| *-. \ \ \ Merge branches 'for-4.13/apple' and 'for-4.13/asus' into for-linusJiri Kosina2017-07-101-2/+3
| |\ \ \ \ \ | | |_|_|/ / | |/| | | / | | | |_|/ | | |/| | Conflicts: drivers/hid/hid-core.c
| | | * | HID: asus: Add support for Zen AiO MD-5110 keyboardDaniel Drake2017-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for media keys on the MD-5110 wireless keyboard that comes with the Asus V221ID and ZN241IC All In One computers. The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. The USB Vendor ID suggests that it is a TURBOX device, but the physical branding only mentions ASUS MD-5110. Signed-off-by: Daniel Drake <drake@endlessm.com> Acked-by: Benjamin Tissoires <benajmin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | HID: move Asus keyboard support from hid-chicony to hid-asusDaniel Drake2017-06-081-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Asus AIO keyboard AK1D was added to hid-chicony based on its USB vendor ID, however images available online suggest that this keyboard is physically branded as ASUS with no mention of Chicony. A recent commit also added support for another Asus AIO keyboard into hid-chicony, this one with USB vendor ID Jess, and a pending review comment asked me to move it into hid-asus because it is also only physically branded as ASUS. I updated the USB ID defines to match the branding and product name, including noting that the recently added keyboard is labelled as ASUS MD-5112. Signed-off-by: Daniel Drake <drake@endlessm.com> Acked-by: Benjamin Tissoires <benajmin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | Merge tag 'driver-core-4.13-rc1' of ↵Linus Torvalds2017-07-041-14/+10Star
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big driver core update for 4.13-rc1. The large majority of this is a lot of cleanup of old fields in the driver core structures and their remaining usages in random drivers. All of those fixes have been reviewed by the various subsystem maintainers. There's also some small firmware updates in here, a new kobject uevent api interface that makes userspace interaction easier, and a few other minor things. All of these have been in linux-next for a long while with no reported issues" * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits) arm: mach-rpc: ecard: fix build error zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO() driver-core: remove struct bus_type.dev_attrs powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type powerpc: vio: use dev_groups and not dev_attrs for bus_type USB: usbip: convert to use DRIVER_ATTR_RW s390: drivers: convert to use DRIVER_ATTR_RO/WO platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW pcmcia: ds: convert to use DRIVER_ATTR_RO wireless: ipw2x00: convert to use DRIVER_ATTR_RW net: ehea: convert to use DRIVER_ATTR_RO net: caif: convert to use DRIVER_ATTR_RO TTY: hvc: convert to use DRIVER_ATTR_RW PCI: pci-driver: convert to use DRIVER_ATTR_WO IB: nes: convert to use DRIVER_ATTR_RW HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups arm: ecard: fix dev_groups patch typo tty: serdev: use dev_groups and not dev_attrs for bus_type sparc: vio: use dev_groups and not dev_attrs for bus_type hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type ...
| * | | HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groupsGreg Kroah-Hartman2017-06-121-14/+10Star
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the quest to get rid of DRIVER_ATTR(), this patch converts the hid-core code to use DRIVER_ATTR_RO() and also moves to use drv_groups as creating individual sysfs files is not good (it races with userspace notifications.) Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: <linux-input@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | HID: let generic driver yield control iff specific driver has been enabledJiri Kosina2017-06-131-61/+221
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many situations where generic HID driver provides some basic level of support for certain device, but later this support (usually by implementing vendor-specific extensions of HID protocol) is extended and the support moved over to a separate (usually per-vendor) specific driver. This might bring a rather unpleasant suprise for users, as all of a sudden there is a new config option they have to enable in order to get any support for their device whatsoever, although previous kernel versions provided basic support through the generic driver. Which is rightfully seen as a regression. Fix this by including the entry for a particular device in hid_have_special_driver[] iff the specific config option has been specified, and let generic driver handle the device otherwise. Also make the behavior of hid_scan_report() (where the same decision is being taken on a per-report level) consistent. While at it, reshuffle the hid_have_special_driver[] a bit to restore the alphabetical ordering (first order by config option, and within those sections order by VID). This is considered a short-term solution, before generic way of giving precedence to special drivers and falling back to generic driver is figured out. While at it, fixup a missing entry for GFRM driver; thanks to Hans de Geode for spotting this (and for discovering a few issues in the conversion). Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: asus: Add support for T100 keyboardHans de Goede2017-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keyboard dock used with the Asus Transformer T100 series, uses the same vendor-defined 0xff31 usage-page as some other Asus keyboards. But with a small twist, it has a small descriptor bug which needs to be fixed up for things to work. This commit adds the USB-ID for this keyboard to the hid-asus driver and makes asus_report_fixup fix the descriptor issue, fixing various special function keys on this keyboard not working. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: elecom: extend to fix the descriptor for DEFT trackballsDiego Elio Pettenò2017-05-111-0/+2
|/ | | | | | | | | | | | | | | The ELECOM DEFT trackballs report only five buttons, when the device actually has 8. Change the descriptor so that the HID driver can see all of them. For completeness and future reference, I included a side-by-side diff of the part of the descriptor that is being edited. Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Yuxuan Shui <yshuiv7@gmail.com> Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-4.12/asus' into for-linusJiri Kosina2017-05-021-2/+4
|\
| * HID: asus: fix and generalize ambiguous preprocessor macrosMatjaz Hegedic2017-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commits a1cbda7a65a7a ("HID: asus: drop dependency on I2C_HID") and 64a403c6555fd ("HID: asus: support Republic Of Gamers special keys") hid-asus only pertained to a single I2C keyboard model found in ASUS X205TA, F205TA, & X200HA. The aforementioned commits expanded this support to other ASUS laptop keyboard models. In order to clarify that existing keyboard and touchpad quirks only apply to the I2C devices, and not ASUS keyboards in general, I2C HID IDs and their corresponding quirk sets have been renamed. In addition, the latter commit introduced special key handling, which also applies to the I2C keyboard, not just Republic of Gamers series. Therefore, the rog_map_key_clear() macro is renamed to asus_map_key_clear() for the sake of generality. Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: asus: support Republic of Gamers special keysChris Chiu2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | Add support for the special keys found on the internal keyboard of the Asus Republic of Gamers (ROG) laptop models GL553VD, GL553VE, GL753VD and GL753VE. Signed-off-by: Chris Chiu <chiu@endlessm.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| |
| \
| \
| \
| \
| \
| \
| \
*-------. \ Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', ↵Jiri Kosina2017-05-021-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'for-4.12/cp2112', 'for-4.12/hid-core-null-state-handling', 'for-4.12/hiddev', 'for-4.12/i2c-hid', 'for-4.12/innomedia', 'for-4.12/logitech-hidpp-battery-power-supply', 'for-4.12/multitouch', 'for-4.12/nti', 'for-4.12/upstream' and 'for-4.12/wacom' into for-linus
| | | | | * | HID: Add quirk driver for NTI USB-SUN adapterJonathan Tomer2017-03-061-0/+1
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These adapters allow pre-USB Sun keyboards to be connected to USB-only machines, but include the wrong maximum keycode in their report descriptor, making most of the keys present on Sun keyboards but not 101-key PC keyboards nonfunctional. This patch implements a quirk that overrides the maximum keycode in the report descriptor. Signed-off-by: Jonathan Tomer <jktomer@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | HID: hiddev: reallocate hiddev's minor numberJaejoong Kim2017-03-211-1/+1
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to store the minor number each drivers. In case of hidraw, the minor number is stored stores in struct hidraw. But hiddev's minor is located in struct hid_device. The hid-core driver announces a kernel message which driver is loaded when HID device connected, but hiddev's minor number is always zero. To proper display hiddev's minor number, we need to store the minor number asked from usb core and do some refactoring work (move from hiddev.c to hiddev.h) to access hiddev in hid-core. [jkosina@suse.cz: rebase on top of newer codebase] Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * / / / HID: Accutouch: Add driver for ELO Accutouch 2216 USB TouchscreensMartyn Welch2017-03-211-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Accutouch 2216 is reporting BTN_LEFT/BTN_MOUSE rather than BTM_TOUCH in it's capabilities, which is what user space expects a touchscreen device to report. This is causing udev to consider the device to be a "VMware's USB mouse" rather than as a touchscreen, which results in a mouse cursor being displayed in Weston. This patch adds a special driver for the device to correct the capabilities reported. Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | Revert "HID: rmi: Handle all Synaptics touchpads using hid-rmi"Jiri Kosina2017-04-111-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 279967a65b320d174a507498aea7d44db3fee7f4. Multiple regressions [1] [2] [3] have been reported. The hid-rmi support would have to fixed and redone in 4.11+. [1] http://lkml.kernel.org/r/b79b88c8-770a-13f6-5668-c3a94254e5e0@gmail.com [2] http://lkml.kernel.org/r/375e67b5-2cb8-3491-1d71-d8650d6e9451@gmail.com [3] https://bugzilla.kernel.org/show_bug.cgi?id=195287 Reported-by: Cameron Gutman <aicommander@gmail.com> Reported-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Reported-by: Lorenzo J. Lucchini <ljlbox@tiscali.it> Reported-by: Thorsten Leemhuis <linux@leemhuis.info> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | HID: uclogic: add support for Ugee Tablet EX07SXiaolei Yu2017-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has a different vendor id but responds to initialization. Signed-off-by: Xiaolei Yu <dreifachstein@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | HID: xinmo: fix for out of range for THT 2P arcade controller.Peter Stein2017-03-241-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a new clone of the XIN MO arcade controller which has same issue with out of range like the original. This fix will solve the issue where 2 directions on the joystick are not recognized by the new THT 2P arcade controller with device ID 0x75e1. In details the new device ID is added the hid-id list and the hid-xinmo source code. Signed-off-by: Peter Stein <peter@stuntstein.dk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to ↵Oscar Campos2017-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hid-corsair This mouse sold by Corsair as Scimitar PRO RGB defines two consecutive Logical Minimum items in its Application (Consumer.0001) report making it non parseable. This patch fixes the report descriptor overriding byte 77 in rdesc from 0x16 (Logical Minimum with 16 bits value) to 0x26 (Logical Maximum with 16 bits value). Signed-off-by: Oscar Campos <oscar.campos@member.fsf.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: chicony: Add support for another ASUS Zen AiO keyboardDaniel Drake2017-03-061-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for media keys on the keyboard that comes with the Asus V221ID and ZN241IC All In One computers. The keys to support here are WLAN, BRIGHTNESSDOWN and BRIGHTNESSUP. This device is not visibly branded as Chicony, and the USB Vendor ID suggests that it is a JESS device. However this seems like the right place to put it: the usage codes are identical to the currently supported devices, and this driver already supports the ASUS AIO keyboard AK1D. Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: rmi: fallback to generic/multitouch if hid-rmi is not builtJiri Kosina2017-02-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") unconditionally switches over handling of all Synaptics touchpads to hid-rmi (to make use of extended features of the HW); in case CONFIG_HID_RMI is disabled though this renders the touchpad unusable, as the HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) match doesn't exist and generic/multitouch doesn't bind to it either (due to hid group mismatch). Fix this by switching over to hid-rmi only if it has been actually built. Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| |
| \
| \
| \
| \
| \
| \
| \
| \
| \
*---------. \ Merge branches 'for-4.10/upstream-fixes', 'for-4.11/intel-ish', ↵Jiri Kosina2017-02-201-17/+9Star
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'for-4.11/mayflash', 'for-4.11/microsoft', 'for-4.11/rmi', 'for-4.11/upstream' and 'for-4.11/wacom' into for-linus
| | | | | * | | HID: remove use of DRIVER_LICENSEGrant Grundler2017-01-061-2/+1Star
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Local "#define DRIVER_LICENSE" obfuscates which license is used in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative when the string is hard coded in MODULE_LICENSE. Signed-off-by: Grant Grundler <grundler@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>