summaryrefslogtreecommitdiffstats
path: root/drivers/hid
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | | * | | HID: wiimote: Parse accelerometer dataDavid Herrmann2011-09-071-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add parser functions for accelerometer data reported by the wiimote. The data is almost always reported in the same format, so we can use a single handler. However, an own handler function is created for each DRM-mode because when IR and extension support is added, each of them is parsed differently. Also set the appropriate DRM including accelerometer data on DRM requests to actually retrieve the accelerometer data. Data is reported to userspace as ABS_RX/Y/Z values. The values are between -500 and 500 and 0 means no acceleration. See also userspace xwiimote library for data parsing. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: wiimote: Add accelerometer input deviceDavid Herrmann2011-09-071-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new input device for every wiimote which is used to report accelerometer data to userspace. Only if the input device is currently open, we make the wiimote send accelerometer data. This saves a whole lot of energy on the wiimote if an application is only interested in button input reports. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: wiimote: Add force-feedback supportDavid Herrmann2011-09-071-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wiimote has a single rumble motor. This adds force feedback support for wiimote devices with FF_RUMBLE. The rumble motor is very simple and only supports an on/off switch so no complex ff-effects are supported. This also removes the event callback that was registered before but unused. The ff-device overwrites this callback, anyway. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | | * | | HID: wiimote: Support rumble deviceDavid Herrmann2011-09-071-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the wiimote's rumble device. Every output report can enable and disable the rumble motor. Hence, every output report must look up our new RUMBLE flag and make sure that it does not unintentionally toggle the rumble motor. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | | HID: roccat: Kone now reports external profile changes via roccat deviceStefan Achatz2011-09-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | | HID: roccat: cleaned up code for Kone and fixed wrong initialization valueStefan Achatz2011-09-071-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced function kone_profile_activated() to reduce code duplication. This by the way fixes a wrong initialization value. Also fixes early mutex unlocks. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | | HID: roccat: Kovaplus now reports external profile changes via roccat deviceStefan Achatz2011-09-071-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | | HID: roccat: Pyra now reports external profile changes via roccat deviceStefan Achatz2011-09-071-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profile changes were only reported when issued mouse internal. Now all changes are reported. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | | * | | | HID: roccat: Fixed false dpi reporting when using osd eventStefan Achatz2011-09-071-2/+2
| | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actual dpi resolution was set on wrong occassion. Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: multitouch: decide if hid-multitouch needs to handle mt devicesBenjamin Tissoires2011-09-261-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that hid-generic ignores all win7 compatible multitouch devices, this patch allows hid-multitouch to catch them. The idea is to rely on the quirk HID_QUIRK_MULTITOUCH to drop the device if no ContactID is given. There is the need for a blacklist here as other devices may need a special driver (ntrig for instance). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: add autodetection of multitouch devicesBenjamin Tissoires2011-09-262-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned by http://www.microsoft.com/whdc/device/input/DigitizerDrvs_touch.mspx multitouch devices are those that have the input report HID_CONTACTID. This patch detects this and unloads the generic-usb driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: hid-multitouch: add support for the IDEACOM 6650 chipStephane Chatty2011-09-203-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IDEACOM 6650 multitouch chip, present in various all-in-one computers, uses the serial version of the HID multitouch protocol. No existing class supports this. In principle, the new MT_CLS_SERIAL should work for other serial panels as well, perhaps including some eGalax panels. Signed-off-by: Stephane Chatty <chatty@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: hid-multitouch: Add LG Display Multitouch device.Jeff Brown2011-08-164-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This panel is also known as the Dell ST2220Tc. Signed-off-by: jeffbrown@android.com Reviewed-By: Benjamin Tissoires <Benjamin_Tissoires@logitech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | | * | | | HID: hid-multitouch: Filter collections by application usage.Jeff Brown2011-08-161-0/+10
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two problems. First, it ensures that the hid-multitouch driver does not incorrectly map GenericDesktop usages that are intended for other applications, such as a Mouse. Second, it sets the appropriate input properties so that user-space can distinguish TouchScreen devices (INPUT_PROP_DIRECT) from TouchPad devices (INPUT_PROP_POINTER) and configure them accordingly. Signed-off-by: jeffbrown@android.com Acked-By: Benjamin Tissoires <Benjamin_Tissoires@logitech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: "hid-logitech" driver with Logitech Driving Force GTMichal Malý2011-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's been a small oversight when adding support for Logitech Driving Force GT. Entry in hid-core was missing so the generic driver instead of hid-logitech was being used. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: hid-logitech-dj: fix off by oneNestor Lopez Casado2011-09-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug where a device with index 6 would write out of bounds in the array of paired devices. This patch fixes that problem. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Olivier Gay <ogay@logitech.com> Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: Add full support for Logitech Unifying receiversNestor Lopez Casado2011-09-156-0/+1059
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this driver, all the devices paired to a single Unifying receiver are exposed to user processes in separated /input/dev nodes. Keyboards with different layouts can be treated differently, Multiplayer games on single PC (like home theater PC) can differentiate input coming from different kbds paired to the same receiver. Up to now, when Logitech Unifying receivers are connected to a Linux based system, a single keyboard and a single mouse are presented to the HID Layer, even if the Unifying receiver can pair up to six compatible devices. The Unifying receiver by default multiplexes all incoming events (from multiple keyboards/mice) into these two. Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: hid-lg4ff: add a kfree() to an error pathDan Carpenter2011-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a small rare potential memory leak here. Also Walter Harms points out that we can do a small cleanup as well by using kstrdup(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: hid-lg4ff: silence sparse complaintDan Carpenter2011-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse complains that: drivers/hid/hid-lg4ff.c:288:44: warning: Using plain integer as NULL pointer drivers/hid/hid-lg4ff.c:311:44: warning: Using plain integer as NULL pointer Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: make CONFIG_LOGIWHEELS_FF default to CONFIG_LOGITECH_FFJiri Kosina2011-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do this for backwards compatibility reasons (LOGIWHEELS_FF has been split-off from LOGITECH_FF), so that users don't have regressions with 'default' kernel configs. Reported-and-tested-by: simon@mungewell.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: lg4ff - Fix misleading info in KconfigMichal Malý2011-08-043-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The description of lg4ff driver has to be changed to reflect the fact that the driver now handles a lot more Logitech wh the Wii. Entry in Kconfig has been renamed to LOGIWHEELS_FF Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: lg4ff - Add autocentering command accepted by Formula Force EXMichal Malý2011-08-041-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Logitech driver sends Formula Force EX wheel a different command to autocenering force. FFEX will accept the standard command used by the rest of the wheels, but it won't set the centering properly. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: lg4ff - Add range setting support and sysfs interfaceMichal Malý2011-08-043-12/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wheel range of certain Logitech wheels - namely Driving Force GT, Driving Force Pro, G25 and G27 can be adjusted. Minimu is 40 degrees, maximum 900. DFGT, G25 and G27 all use a common command, DFP uses another one. Range can be set from userspace by writing to "/sys/module/hid_logitech/drivers/hid:logitech/<dev>range". The driver use list to store range of each connected wheel; it's not possible to use driver_data in hid_device struct as it's already b hig-lg driver. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: lg4ff - Add support for native mode switchingMichal Malý2011-08-041-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows the lg4ff driver to switch wheels to the native mode. Since this is specific to Logitech wheels only, it's handled in hid-lg4ff rather than hid-lg. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | | HID: lg4ff - Move handling of Logitech wheels to lg4ff driverMichal Malý2011-08-044-43/+60
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first out of five patches me and Simon Wood (CC'd) have been working on. It separates the handling of Logite from the generic lgff driver and adds additional features specific for the Logitech wheels, namely - Native mode support for Driving Force GT, Driving Force Pro, G25 and G27 wheels Every Logitech wheel reports itself as generic Logitech Driving Force wheel (VID 046d, PID c294). This is done to ensu wheel will work on every USB HID-aware system even when no Logitech driver is available. It however limits the capabilit wheel - range is limited to 200 degrees, G25/G27 don't report the clutch pedal and there is only one combined axis for t brake. The switch to native mode is done via hardware-specific command which is different for each wheel. When the wheel receives such command, it simulates reconnect and reports to the OS with its actual PID. - Adjustable wheel range DFGT, DFP, G25 and G27 have variable range of the steering wheel. The range is limited by applying a maximum constant when the wheel is turned beyond the allowed range. The limit as also set by a hardware-specific command. There is a comm command for DFGT, G25 and G27 and another one for DFP. It is probably possible to use the DFP command to limit the range other Logitech wheels too, but this is not supported by the official Logitech driver for Windows. The patch adds a sysfs interface which allows for the range to be set from userspace. - Fixed autocentering command All Logitech wheels support FF_AUTOCENTER effect. The original implementation in the lgff driver didn't work well with patch fixes it. According to USB communication sniffs the Formula Force EX (pretty much rebranded original Driving Force accept the generic autocentering command, this issue is also addressed by the patch There are still some features this patch doesn't cover, but since some of them will most likely require modifications of memless driver we have decided not to include them yet. As first we decided to move the handling of Logitech wheels from hid-lgff driver to hid-lg4ff driver (originally used fo At also adds PID of Logitech Driving Force GT. Signed-off-by: Michal Malý <madcatxster@gmail.com> Signed-off-by: Simon Wood <simon@mungewell.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | HID: ACRUX - handle gamepads with different report layoutSergei Kolzun2011-08-041-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are gamepads that share the same VID and PID but have different report structure - instead of having 4 fields with one value they have one field that can hold all 4 values. Make the driver cope with devices using both styles. Signed-off-by: Sergei Kolzun <x0r@dv-life.ru> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | | HID: ACRUX - fix enabling force feedback supportSergei Kolzun2011-08-041-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config option needs to be a 'bool' and not a tristate, otheriwse force feedback support never makes it into the module. Signed-off-by: Sergei Kolzun <x0r@dv-life.ru> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | Merge branch 'for-linus' of git://github.com/dtor/inputLinus Torvalds2011-09-161-0/+2
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://github.com/dtor/input: Input: wacom - fix touch parsing on newer Bamboos Input: bcm5974 - add MacBookAir4,1 trackpad support Input: wacom - add POINTER and DIRECT device properties Input: adp5588-keys - remove incorrect modalias Input: cm109 - fix checking return value of usb_control_msg Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner Input: wacom - remove pressure for touch devices
| * | | Input: wacom - add POINTER and DIRECT device propertiesJason Gerecke2011-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the hardware supported by the Wacom driver. The DIRECT property is assigned to devices with an embedded screen (i.e. touchscreens and display tablets). The POINTER property is assigned to those without embedded screens. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| | | |
| \ \ \
*-. \ \ \ Merge branches 'upstream-fixes' and 'magicmouse' into for-linusJiri Kosina2011-09-074-23/+67
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| | * | | HID: magicmouse: ignore 'ivalid report id' while switching modes, v2Jiri Kosina2011-08-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is basically a more generic respin of 23746a6 ("HID: magicmouse: ignore 'ivalid report id' while switching modes") which got reverted later by c3a492. It turns out that on some configurations, this is actually still the case and we are not able to detect in runtime. The device reponds with 'invalid report id' when feature report switching it into multitouch mode is sent to it. This has been silently ignored before 0825411ade ("HID: bt: Wait for ACK on Sent Reports"), but since this commit, it propagates -EIO from the _raw callback . So let the driver ignore -EIO as response to 0xd7,0x01 report, as that's how the device reacts in normal mode. Sad, but following reality. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=35022 Reported-by: Chase Douglas <chase.douglas@canonical.com> Reported-by: Jaikumar Ganesh <jaikumarg@android.com> Tested-by: Chase Douglas <chase.douglas@canonical.com> Tested-by: Jaikumar Ganesh <jaikumarg@android.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | | HID: magicmouse: Set resolution of touch surfacesChase Douglas2011-08-101-10/+46
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add touch surface resolution information. The size of the touch surfaces has been determined to the hundredth of a mm. Cc: Jiri Kosina <jkosina@suse.cz> Cc: Michael Poole <mdpoole@troilus.org> Cc: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Chase Douglas <chase.douglas@canonical.com> [jkosina@suse.cz: update comments and commit message] Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: wacom: Unregister sysfs attributes on removeDavid Herrmann2011-09-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HID devices can be hotplugged so we should unregister all sysfs attributes when removing a driver. Otherwise, manually unloading the wacom-driver will not remove the sysfs attributes. Only when the device is disconnected, they are removed, eventually. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: wacom: Fix error path of power-supply initializationDavid Herrmann2011-09-071-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | power_supply_unregister() must not be called if power_supply_register() failed. The wdata->psy.dev pointer may point to invalid memory after a failed power_supply_register() and hence wacom_remove() will fail while calling power_supply_unregister(). This changes the wacom_probe function to fail if it cannot register the power_supply devices. If we would want to keep the previous behaviour we had to keep some flag about the power_supply state and check it on wacom_remove, but this seems inappropriate here. Hence, we simply fail, too, if power_supply_register fails. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: add support for HuiJia USB Gamepad connectorClemens Werther2011-08-252-0/+2
|/ / / | | | | | | | | | | | | | | | | | | Create each gamepad as a separate joystick Signed-off-by: Clemens Werther <clemens.werther@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | Merge branches 'wiimote' and 'upstream-fixes' into for-linusJiri Kosina2011-08-244-0/+16
|\ \ \
| * | | HID: usbhid: Add support for SiGma Micro chipJeremiah Matthey2011-08-232-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch to add SiGma Micro-based keyboards (1c4f:0002) to hid-quirks. These keyboards dont seem to allow the records to be initialized, and hence a timeout occurs when the usbhid driver attempts to initialize them. The patch just adds the signature for these keyboards to the hid-quirks list with the setting HID_QUIRK_NO_INIT_REPORTS. This removes the 5-10 second wait for the timeout to occur. Signed-off-by: Jeremiah Matthey <sprg86@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | | HID: add support for new revision of Apple aluminum keyboardDan Bastone2011-08-013-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add USB device ids for the new revision (MB110LL/B) of Apple's wired aluminum keyboard. I have only confirmed that the ANSI version is correct - it is assumed that the ISO and JIS versions follow the standard numbering convention. Signed-off-by: Dan Bastone <dan@pwienterprises.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: wiimote: Add status and return request handlersDavid Herrmann2011-08-231-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wiimote resets the current drm when an extension is plugged in. Fortunately, it also sends a status report in this situation so we just reset the drm on every status report to keep the drm consistent. Also handle return reports from the wiimote which indicate success and failure of requests that we've sent. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: wiimote: Add drm requestDavid Herrmann2011-08-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wiimote reports data in several data reporting modes (DRM). The DRM request makes the wiimote send data in the requested drm. The DRM mode can be set explicitely or can be chosen by the driver. To let the driver choose the DRM mode, pass WIIPROTO_REQ_NULL placeholder to it. This is no valid request and is replaced with an appropriate DRM. Currently, the driver always sets the basic DRM_K mode, but this will be extended when further peripherals like accelerometer and IR are supported. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: wiimote: Register led class devicesDavid Herrmann2011-08-232-59/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | This registers 4 led devices to allow controlling the wiimote leds via standard LED sysfs API. It removes the four sysfs attributes so we don't have two APIs for one device. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: wiimote: Correctly call HID open/close callbacksDavid Herrmann2011-08-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the bluetooth hid backend does not react on open/close callbacks, we should call them to be consistent with other hid drivers. Also the new input open/close handlers will be used in future to prepare the wiimote device for IR/extension input. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: wiimote: Simplify synchronizationDavid Herrmann2011-08-231-51/+27
|/ / | | | | | | | | | | | | | | | | | | The new locking scheme in HID core allows us to remove a bit of synchronization. Since the HID layer acts synchronously we simply register input core last and there are no synchonization issues anymore. Also register sysfs files after that to simplify the code. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| |
| \
*-. \ Merge branches 'roccat', 'upstream' and 'wiimote' into for-linusJiri Kosina2011-07-2219-51/+1289
|\ \ \
| | * | HID: wiimote: Add sysfs support to wiimote driverDavid Herrmann2011-07-111-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add sysfs files for each led of the wiimote. Writing 1 to the file enables the led and 0 disables the led. We do not need memory barriers when checking wdata->ready since we use a spinlock directly after it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: wiimote: Cache wiimote led stateDavid Herrmann2011-07-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the current state of the leds in the wiimote data structure. This allows us to discard new led requests that wouldn't change anything. Protect the whole state structure by a spinlock. Every wiiproto_* function expects this spinlock to be held when called. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: wiimote: Add wiimote led requestDavid Herrmann2011-07-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new request that sets the leds on the target device. Also, per default, set led1 after initializing a device. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: wiimote: Add wiimote input button parserDavid Herrmann2011-07-111-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse input report 0x30 from the wiimote as button input. We need to send events for all buttons on every input report because the wiimote does not send events for single buttons but always for all buttons to us. The input layer, however, filters redundant events. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: wiimote: Add wiimote event handlerDavid Herrmann2011-07-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create array of all event handlers and call each handler when we receive the related event. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * | HID: wiimote: Add output queue for wiimote driverDavid Herrmann2011-07-111-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The raw hid output function that is supported by bluetooth low-level hid driver does not provide an output queue and also may sleep. The wiimote driver, though, may need to send data in atomic context so this patch adds a buffered output queue for the wiimote driver. We use the shared workqueue to send our buffer to the hid device. There is always only one active worker which flushes the whole output queue to the device. If our queue is full, every further output is discarded. Special care is needed in the deinitialization routine. When wiimote_hid_remove is called, HID input is already disabled, but HID output may still be used from our worker and is then discarded by the lower HID layers. Therefore, we can safely disable the input layer since it is the only layer that still sends input events. Future sysfs attributes must be freed before unregistering input to avoid the sysfs handlers to send input events to a non-existing input layer. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
OpenPOWER on IntegriCloud