summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Input: drv260x - add TI drv260x haptics driverDan Murphy2014-08-196-0/+865
| | | | | | | | | | | | | | | Add the TI drv260x haptics/vibrator driver. This device uses the input force feedback to produce a wave form to driver an ERM or LRA actuator device. The initial driver supports the devices real time playback mode. But the device has additional wave patterns in ROM. This functionality will be added in future patchsets. Product data sheet is located here: http://www.ti.com/product/drv2605 Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: edt-ft5x06 - remove superfluous assignmentMaks Naumov2014-08-131-1/+0
| | | | | | | Somehow we ended up with a duplicate line in edt_ft5x06_register_write() Signed-off-by: Maks Naumov <maksqwe1@ukr.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: xpad - add support for Xbox One controllersTed Mielczarek2014-08-131-17/+157
| | | | | | | | | | | | | | | Xbox One controllers require an initialization message to start sending data, so xpad_init_output becomes a required function. The Xbox One controller does not have LEDs like the Xbox 360 controller, so that functionality is not implemented. The format of messages controlling rumble is currently undocumented, so rumble support is not yet implemented. Note that Xbox One controller advertises three interfaces with the same interface class, subclass and protocol, so we have to also match against interface number. Signed-off-by: Ted Mielczarek <ted@mielczarek.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: atmel_mxt_ts - fix a few issues reported by CoverityDmitry Torokhov2014-08-131-6/+11
| | | | | | | | | | | | | | | | | | | This should fix the following issues reported by Coverity: *** CID 1230625: Logically dead code (DEADCODE) /drivers/input/touchscreen/atmel_mxt_ts.c: 1692 in mxt_initialize() *** CID 1230627: Missing break in switch (MISSING_BREAK) /drivers/input/touchscreen/atmel_mxt_ts.c: 1436 in mxt_get_object_table() *** CID 1230629: Out-of-bounds write (OVERRUN) /drivers/input/touchscreen/atmel_mxt_ts.c: 1267 in mxt_update_cfg() *** CID 1230632: Unused pointer value (UNUSED_VALUE) /drivers/input/touchscreen/atmel_mxt_ts.c: 1211 in mxt_update_cfg() Acked-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: atmel_mxt_ts - split config update a bitDmitry Torokhov2014-08-131-125/+145
| | | | | | | | | Let's split config update code a bit so it is hopefully a bit easier to read. Also, the firmware update callback should be the entity releasing firmware blob, not lower layers. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
* Input: atmel_mxt_ts - simplify mxt_initialize a bitDmitry Torokhov2014-08-131-39/+42
| | | | | | | | I think having control flow with 2 goto/labels/flags is quite hard to read, this version is a bit more readable IMO. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
* Input: cap1106 - allow changing key mapping from userspaceDmitry Torokhov2014-08-081-1/+7
| | | | | | | | Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings from userspace. Reviewed-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics - use firmware data for Cr-48Henrik Rydberg2014-08-081-2/+68
| | | | | | | | | | | | | | | | | | | | | | | The profile sensor clickpad in a Cr-48 Chromebook does a reasonable job of tracking individual fingers. This tracking isn't perfect, but, experiments show that it works better than just passing "semi-mt" data to userspace, and making userspace try to deduce where the fingers are given a bounding box. This patch tries to report correct two-finger positions instead of the {(min_x, min_y), (max_x, max_y)} for profile sensor clickpads on Cr-48 chromebooks. Note that this device's firmware always reports the higher (smaller y) finger in the "sgm" packet, and the lower (larger y) finger in the "agm" packet. Thus, when a new finger arrives on the pad, the kernel driver uses input core's contact tracking facilities to match contacts with slots. Inspired by patch by Daniel Kurtz <djkurtz@chromium.org> and Chung-yih Wang <cywang@chromium.org> Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics - properly initialize slots for semi-MTDmitry Torokhov2014-08-071-3/+3
| | | | | | | | | | Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually. Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: MT - make slot cleanup callable outside mt_sync_frame()Henrik Rydberg2014-08-072-11/+28
| | | | | | | | | | Some semi-mt drivers use the slots in a manual way, but may still want to call parts of the frame synchronization logic. This patch makes input_mt_drop_unused callable from those drivers. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: atmel_mxt_ts - mXT224 DMA quirk was fixed in firmware v2.0.AANick Dyer2014-08-071-3/+5
| | | | | Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Merge branch 'wacom' into nextDmitry Torokhov2014-08-0611-2119/+1361
|\ | | | | | | | | | | Merge large update to Wacom driver, converting it from USB to a HID driver and unifying wired and bluetooth support, from Benjamin Tissoires.
| * Input: wacom - only register once the MODULE_* macrosBenjamin Tissoires2014-08-062-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Putting the various MODULE_* makes them appear several times in modinfo because wacom.h is used both in wacom_sys.c and wacom_wac.h. Having the macros near the module declaration makes them appear only once. Add also MODULE_VERSION(DRIVER_VERSION) to export the current version number. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: HID - remove hid-wacom Bluetooth driverBenjamin Tissoires2014-08-063-982/+2
| | | | | | | | | | | | | | | | | | | | Bluetooth Wacom tablets are now handled by the regular wacom.ko driver. Remove the now useless hid-wacom driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - add copyright note and bump version to 2.0Benjamin Tissoires2014-08-061-1/+4
| | | | | | | | | | | | | | Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - remove passing id for wacom_set_reportPrzemo Firszt2014-08-061-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | Every call of wacom_set_report was passing "id" as a separate parameter and buffer also passed the same information. We can use first u8 of the buffer instead of "id" Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - check for bluetooth protocol while setting OLEDsBenjamin Tissoires2014-08-061-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Bluetooth Intuos 4 use 1-bit definition while the USB ones use a 4-bits definition. This changes the size of the raw image we receive, and thus the kernel will only accept 1-bit images for Bluetooth and 4-bits for USB. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Przemo Firszt <przemo@firszt.eu> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - handle Intuos 4 BT in wacom.koBenjamin Tissoires2014-08-065-2/+92
| | | | | | | | | | | | | | | | | | | | | | A good point of this change is that now, the Intuos4 bluetooth can handle the different tools (artpen, airbrush, mice), and we get a common interface between USB and BT for accessing the LEDs/OLEDs. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - handle Graphire BT tablets in wacom.koBenjamin Tissoires2014-08-065-5/+132
| | | | | | | | | | | | | | | | | | First, merge the Graphire BT tablet. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - prepare the driver to include BT devicesBenjamin Tissoires2014-08-062-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | Now that wacom is a hid driver, there is no point in having a separate driver for bluetooth devices. This patch prepares the common paths of Bluetooth devices in the common wacom driver. It also adds the sysfs file "speed" used by Bluetooth devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - add support for 0x12C ISDv4 sensorJason Gerecke2014-07-281-0/+4
| | | | | | | | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - register an ac power supply for wireless devicesBenjamin Tissoires2014-07-253-5/+55
| | | | | | | | | | | | | | | | | | | | | | This is used by HID Bluetooth devices but also add some more information to the USB Wireless Receiver. We are just porting the bits from hid-wacom.c to the common driver here. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use a uniq name for the battery deviceBenjamin Tissoires2014-07-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation uses "wacom_battery" as a generic name for batteries. This prevents us to have two Wacom devices with a battery attached as the power system will complain about the name which is already registered. Use an incremental name for each battery attached. Related bug: https://sourceforge.net/p/linuxwacom/bugs/248/ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - enhance Wireless Receiver battery reportingBenjamin Tissoires2014-07-254-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reports the current status of the battery (discharging, charging, full). - Also notify the upower daemon when there is a change in the battery value. - keep the battery value as a percentage, not the raw value - add WACOM_QUIRK_BATTERY to easily add a battery to a device (required for Bluetooth devices) Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - put a flag when the led are initializedBenjamin Tissoires2014-07-252-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves a bug with the wireless receiver: - at plug, the wireless receiver does not know which Wacom device it is connected to, so it does not actually creates all the LEDs - when the tablet connects, wacom->wacom_wac.features.type is set to the proper device so that wacom_wac can understand the packets - when the receiver is unplugged, it detects that a LED should have been created (based on wacom->wacom_wac.features.type) and tries to remove it: crash when removing the sysfs group. Side effect, we can now safely call several times wacom_destroy_leds(). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - support up to 2048 pressure levels with ISDv4Jason Gerecke2014-07-251-1/+1
| | | | | | | | | | | | Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - move the USB (now hid) Wacom driver in drivers/hidBenjamin Tissoires2014-07-258-19/+16
| | | | | | | | | | | | | | | | wacom.ko is now a full HID driver, we have to move it into the proper subdirectory: drivers/hid. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - keep wacom_ids orderedBenjamin Tissoires2014-07-251-40/+39
| | | | | | | | | | | | | | | | | | No Functional changes, just some reordering. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - remove field pktlen declaration in the list of devicesBenjamin Tissoires2014-07-252-269/+247
| | | | | | | | | | | | | | | | | | | | | | | | pktlen is now overwritten by the driver directly by reading the hid report descriptor. There is no need to declare it statically. We also move down the position of the field in the struct so that we can keep the current declaration of Wacom devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use hidinput_calc_abs_res instead of duplicating its codeBenjamin Tissoires2014-07-251-39/+9
| | | | | | | | | | | | | | | | | | | | This may infer a small difference with the previous implementation due to the DIV_ROUND_CLOSEST() in the hid implementation. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use in-kernel HID parserBenjamin Tissoires2014-07-252-238/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | HID already parses the report descriptor, so use it instead of implementing our own. The special case for Bamboo PT 3rd gen is also removed and handled in the same way Intuos 5 is treated, by hardcoding it in the driver. Last, the unit_exponent stored into the hid field already is signed, so there is no need to handle a two's complement anymore. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use hid_info instead of plain dev_infoBenjamin Tissoires2014-07-251-5/+3
| | | | | | | | | | | | | | | | | | Removes one more need of usb and intf. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - register power device at the HID levelBenjamin Tissoires2014-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | Use the HID device as the parent for the power device when dealing with a wireless receiver. Removes one more usb dependency and does not break user space. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - remove usb dependency for siblings devicesBenjamin Tissoires2014-07-251-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wacom tablets can share different physical sensors on one physical device. These are called siblings in the code. The current way of implementation relies on the USB topology to be able to share data amongs those sensors. We can replace the code to match a HID subsystem, without involving the USB topology: - the first probed sensor does not find any siblings in the list wacom_udev_list, so it creates its own wacom_hdev_data with its own struct hid_device - the other sensor checks the current list of siblings in wacom_hdev_data, and if there is a match, it associates itself to the matched device. To be sure that we are not associating different sensors from different physical devices, we also check for the phys path of the hid device which contains the USB topology. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - register the input devices on top of the HID oneBenjamin Tissoires2014-07-252-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matches the current behavior of the HID subsystem and removes one more dependency over USB. The current user space clients which relies on this to fetch the LEDs path need an update. However, we already break them in the kernel v3.11 for the Bluetooth Wacom devices. They are going to be fixed soon. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - install LED/OLED sysfs files in the HID device instead of USBBenjamin Tissoires2014-07-251-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes one more dependency over USB, but requires some changes in the user space to find the sysfs files correctly. This patch breaks the user space. However, the number of program accessing the LEDs is quite limited and we can easily patch them to handle the new HID behavior. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - compute the HID report size to get the actual packet sizeBenjamin Tissoires2014-07-251-32/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes an USB dependency and is more accurate: the computed pktlen is the actual maximum size of the reports forwarded by the device. Given that the pktlen is correctly computed/validated, we can store it now in the features struct instead of having a special handling in the rest of the code. Likewise, this information is not mandatory anymore in the description of devices in wacom_wac.c. They will be removed in a separate patch. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use HID core to actually fetch the report descriptorBenjamin Tissoires2014-07-251-60/+10
| | | | | | | | | | | | | | | | | | | | HID core already retrieves the report descritor. There is no need to ask ourself for one. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - use hid communication instead of plain usbBenjamin Tissoires2014-07-251-45/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wacom.ko was a plain USB driver for a HID device. The communications from/to the devices can actually be replaced with the HID API. At the USB level, the reports are exactly the same. This will allow to use uhid virtual devices instead of true USB devices. This step is necessary to implement regression tests. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - switch from an USB driver to a HID driverBenjamin Tissoires2014-07-257-188/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All USB Wacom tablets are actually HID devices. For historical reasons, they are handled as plain USB devices. The current code makes more and more reference to the HID subsystem like implementing its own HID report descriptor parser to handle new devices. From the user point of view, we can transparently switch from this state to a driver handled in the HID subsystem and clean up a lot of USB specific code in the wacom.ko driver. The other benefit once the USB dependecies have been removed is that we can use a tool like uhid to make regression tests and allow further cleanup or new implementations without risking breaking current behaviors. To match the current handling of devices in wacom_wac.c, we rely on the hid_type set by usbhid. usbhid sets the hid_type to HID_TYPE_USBMOUSE when it sees a USB boot mouse protocol declared and HID_TYPE_USBNONE when the device is plain HID. There is thus a one to one matching between the list of supported devices before and after the switch from USB to HID. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - include and use linux/hid.hBenjamin Tissoires2014-07-251-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current wacom code redefines constants that are already in linux/hid.h This patch includes the official implementation and use it accross the code. There is a conflict with HID_USAGE and others at the same level: - in the wacom.ko implementation, those are the #define regarding the value of the field in the report descriptor - in the hid.h, those are bitmask So add HDESC_ in their current definition. Also, the struct hid_descriptor slightly differs from the linux/hid.h point of view, so mark it as custom for this driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - split out the pad device for the wireless receiverBenjamin Tissoires2014-07-251-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Wireless Receiver should also behave in the same way than regular USB devices. To simplify the unregistering of the different devices, wacom_unregister_inputs() is introduced. For consistency, the function wacom_register_input() is renamed into wacom_register_inputs(). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - split out the pad device for Graphire G4 and MOBenjamin Tissoires2014-07-251-17/+27
| | | | | | | | | | | | | | | | | | | | | | MSC_SERIAL can be safely removed from pad devices. If it is not here, xf86-input-wacom correctly generates ones for its internal use. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - split out the pad device for DTUSBenjamin Tissoires2014-07-251-12/+6
| | | | | | | | | | | | | | | | | | MSC_SERIAL can be safely removed from the pad device. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - split out the pad device for BamboosBenjamin Tissoires2014-07-251-16/+23
| | | | | | | | | | | | | | | | | | | | We rely on the return code of wacom_bpt*() to do the input_sync(). wacom_wac_irq() then properly sync the input devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - split out the pad device for Intuos/CintiqBenjamin Tissoires2014-07-251-86/+122
| | | | | | | | | | | | | | | | | | MSC_SERIAL can be safely dropped for pad input devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - create a separate input device for padsBenjamin Tissoires2014-07-254-9/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the pad events are sent through the stylus input device for the Intuos/Cintiqs, and through the touch input device for the Bamboos. To differentiate the buttons pressed on the pad from the ones pressed on the stylus, the Intuos/Cintiq uses MISC_SERIAL and ABS_MISC. This lead to a multiplexing of the events into one device, which are then splitted out in xf86-input-wacom. Bamboos are not using MISC events because the pad is attached to the touch interface, and only BTN_TOUCH is used for the finger (and DOUBLE_TAP, etc...). However, the user space driver still splits out the pad from the touch interface in the same way it does for the pro line devices. The other problem we can see with this fact is that some of the Intuos and Cintiq have a wheel, and the effective range of the reported values is [0..71]. Unfortunately, the airbrush stylus also sends wheel events (there is a small wheel on it), but in the range [0..1023]. From the user space point of view it is kind of difficult to understand that because the wheel on the pad are quite common, while the airbrush tool is not. A solution to fix all of these problems is to split out the pad device from the stylus/touch. This decision makes more sense because the pad is not linked to the absolute position of the finger or pen, and usually, the events from the pad are filtered out by the compositor, which then convert them into actions or keyboard shortcuts. For backward compatibility with current xf86-input-wacom, the pad devices still present the ABS_X, ABS_Y and ABS_MISC events, but they can be completely ignored in the new implementation. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: wacom - assign phys field from struct wacom into input_devBenjamin Tissoires2014-07-251-0/+1
| | | | | | | | | | | | | | This field was not used for 9 years, it is time to assign it. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Input: Revert "wacom - testing result shows get_report is unnecessary."Benjamin Tissoires2014-07-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1b2faaf7e219fc2905d75afcd4c815e5d39eda80. The Intuos4 series presents a bug in which it hangs if it receives a set feature command while switching to the enhanced mode. This bug is triggered when plugging an Intuos 4 while having a gnome user session up and running. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Aristeu Rozanski <aris@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: hyperv-keyboard - register as a wakeup sourceDexuan Cui2014-08-061-0/+13
| | | | | | | | | | | | | | | | | | With this patch, we can press a key to wake up the VM after the VM executes "echo freeze > /sys/power/state". Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>