summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * hid-input/battery: power-supply type really *is* a batteryJeremy Fitzhardinge2012-01-081-1/+1
| | | | | | | | | | | | | | It just isn't a battery which is powering the computer. upower needs a more nuanced understanding of this. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
| * hid-input/battery: make the battery setup common for INPUTs and FEATUREsJeremy Fitzhardinge2012-01-081-23/+20
| | | | | | | | Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
| * hid-input/battery: deal with both FEATURE and INPUT report batteriesJeremy Fitzhardinge2012-01-081-7/+13
| | | | | | | | | | | | Some devices seem to report batteries as FEATUREs, others as INPUTs. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
| * hid-input/battery: add quirks for batteryJeremy Fitzhardinge2012-01-081-4/+37
| | | | | | | | | | | | | | Some devices always report percentage, despite having 0/255 as their min/max, so add a quirk for them. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
| * hid-input/battery: remove apparently redundant kmallocJeremy Fitzhardinge2012-01-081-12/+3
| | | | | | | | Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
| * hid-input: add support for HID devices reporting Battery StrengthDaniel Nicoletti2012-01-081-15/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've sent an email earlier asking for help with a GetFeature code, and now I have a second patch on top of Jeremy's to provide the battery functionality for devices that support reporting it. If I understood correctly when talking to Jeremy he said his device never actually reported the status as an input event (sorry if I didn't understand it correctly), and after reading HID specs I believe it's really because it was meant to be probed, I have an Apple Keyboard and Magic Trackpad both bluetooth batteries operated, so using PacketLogger I saw that Mac OSX always ask the battery status using the so called GetFeature. What my patch does is basically: - store the report id that matches the battery_strength - setup the battery if 0x6.0x20 is found, even if that is reported as a feature (as it was meant to be but only the MagicTrackpad does) - when upower or someone access /sys/class/power_supply/hid-*/capacity it will probe the device and return it's status. It works great for both devices, but I have two concerns: - the report_features function has a duplicated code - it would be nice if it was possible for specific drivers to provide their own probe as there might be some strange devices... (but maybe it's already possible) I've talked to the upower dev and he fixed it to be able to show the right percentage. Here how the uevent file (in /sys/class/power_supply/hid-*/) looks like: POWER_SUPPLY_NAME=hid-00:22:41:D9:18:E7-battery POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_ONLINE=1 POWER_SUPPLY_CAPACITY=66 POWER_SUPPLY_MODEL_NAME=MacAdmin’s keyboard POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_NAME=hid-70:CD:60:F5:FF:3F-battery POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_ONLINE=1 POWER_SUPPLY_CAPACITY=62 POWER_SUPPLY_MODEL_NAME=nexx’s Trackpad POWER_SUPPLY_STATUS=Discharging Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
* | HID: usbhid: defer LED setting to a workqueueDaniel Kurtz2011-12-211-0/+42
|/ | | | | | | | | Defer LED setting action to a workqueue. This is more likely to send all LED change events in a single URB. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: hid-input: fix compile for !HID_BATTERY_STRENGTHJeremy Fitzhardinge2011-11-301-1/+2
| | | | | | | | | | | | | | | As reported by Stephen Rothwell: drivers/hid/hid-input.c: In function 'hidinput_hid_event': drivers/hid/hid-input.c:865:6: error: 'struct hid_device' has no member named 'battery_val' drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member named 'battery_min' drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member named 'battery_max' Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: hid-input: add support for HID devices reporting Battery StrengthJeremy Fitzhardinge2011-11-281-0/+110
| | | | | | | | | | | | | | | | | | | | | | | Some HID devices, such as my Bluetooth mouse, report their battery strength as an event. Rather than passing it through as a strange absolute input event, this patch registers it with the power_supply subsystem as a battery, so that the device's Battery Strength can be reported to usermode. The battery appears in sysfs names /sys/class/power_supply/hid-<UNIQ>-battery, and it is a child of the battery-containing device, so it should be clear what it's the battery of. Unfortunately on my current Fedora 16 system, while the battery does appear in the UI, it is listed as a Laptop Battery with 0% charge (since it ignores the "capacity" property of the battery and instead computes it from the "energy*" fields, which we can't supply given the limited information contained within the HID Report). Still, this patch is the first step. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: be more strict when ignoring out-of-range fieldsJiri Kosina2011-11-161-3/+2
| | | | | | | | | | | | | | | | | HID 1.11 specification, section 5.10 tells us: HID class devices support the ability to ignore selected fields in a report at run- time. This is accomplished by declaring bit field in a report that is capable of containing a range of values larger than those actually generated by the control. If the host or the device receives an out-of-range value then the current value for the respective control will not be modified. So we shouldn't be restricted to EV_ABS only. Reported-by: Denilson Figueiredo de Sá <denilsonsa@gmail.com> Tested-by: Denilson Figueiredo de Sá <denilsonsa@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: ignore absolute values which don't fit between logical min and maxJiri Kosina2011-11-161-0/+7
| | | | | | | | | | Linux should ignore values outside logical min/max range, as they are not meaningful. This is what at least some of other OSes do, and it also makes sense (currently the value gets misinterpreted larger up the stack). Reported-by: Denilson Figueiredo de Sá <denilsonsa@gmail.com> Tested-by: Denilson Figueiredo de Sá <denilsonsa@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: add autodetection of multitouch devicesBenjamin Tissoires2011-09-261-0/+11
| | | | | | | | | | 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: assorted usage updates from hut 1.12Jarod Wilson2011-05-181-8/+52
| | | | | | | | | | | | | | | | | | | | | | | | | I've got a Tivo Slide bluetooth remote/dongle, which uses a fair number of hid usages that aren't currently mapped in hid-input.c. I'd initially written additions to hid-input.c with just this device in mind, including some bits that were specific to the device. This go around, I'm looking at adding/correcting as many generic HID usages from the HID Usage Tables, version 1.12, as I can -- which also serves to enable all but four of the buttons on the Tivo Slide remote[*]. Outside of fixing the obviously incorrect mapping of 0xc 0x45 from KEY_RADIO to KEY_RIGHT, and making use of the new KEY_IMAGES (just added in 2.6.39-rc4) for AL Image Browser instead of KEY_MEDIA, these are purely additions, and thus should have no negative impact on any already functional HID devices. Most of the added mappings seemed to be perfectly logical to me, but there were a few that were mapped on more of an "I think this makes the most sense" basis. [*] I'll handle the last four tivo buttons via an hid-tivo.c follow-up. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-03-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits) Input: tsc2005 - remove 'disable' sysfs attribute Input: tsc2005 - add open/close Input: tsc2005 - handle read errors from SPI layer Input: tsc2005 - do not rearm timer in hardirq handler Input: tsc2005 - don't use work for 'pen up' handling Input: tsc2005 - do not use 0 in place of NULL Input: tsc2005 - use true/false for boolean variables Input: tsc2005 - hide selftest attribute if we can't reset Input: tsc2005 - rework driver initialization code Input: tsc2005 - set up bus type in input device Input: tsc2005 - set up parent device Input: tsc2005 - clear driver data after unbinding Input: tsc2005 - add module description Input: tsc2005 - remove driver banner message Input: tsc2005 - remove incorrect module alias Input: tsc2005 - convert to using dev_pm_ops Input: tsc2005 - use spi_get/set_drvdata() Input: introduce tsc2005 driver Input: xen-kbdfront - move to drivers/input/misc Input: xen-kbdfront - add grant reference for shared page ...
| * Input: switch completely over to the new versions of get/setkeycodeDmitry Torokhov2011-01-311-2/+2
| | | | | | | | | | | | | | | | | | All users of old style get/setkeycode methids have been converted so it is time to retire them. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| |
| \
*-. \ Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', ↵Jiri Kosina2011-03-171-9/+22
|\ \ \ | |_|/ |/| | | | | 'roccat', 'upstream' and 'upstream-fixes' into for-linus
| | * HID: kernel oops in out_cleanup in function hidinput_connectBenjamin Tissoires2011-02-151-0/+1
| |/ |/| | | | | | | | | | | | | | | | | | | Goto out_cleanup infers a kernel oops: hidinput_disconnect calls input_unregister_driver to all members of hid->inputs. However, hidinput already has been added to hid->inputs even though input_register_device was not called. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Reviewed-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: Do not create input devices for feature reportsHenrik Rydberg2011-03-011-9/+21
|/ | | | | | | | | | | | When the multi input quirk is set, there is a new input device created for every feature report. Since the idea is to present features per hid device, not per input device, revert back to the original report loop and change the feature_mapping() callback to not take the input device as argument. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Tested-by: Benjamin Tissoires <benjmain.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-01-131-4/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-multitouch: minor fixes based on additional review HID: Switch turbox/mosart touchscreen to hid-mosart HID: add Add Cando touch screen 10.1-inch product id HID: hid-mulitouch: add support for the 'Sensing Win7-TwoFinger' HID: hid-multitouch: add support for Cypress TrueTouch panels HID: hid-multitouch: support for PixCir-based panels HID: set HID_MAX_FIELD at 128 HID: add feature_mapping callback
| * HID: add feature_mapping callbackBenjamin Tissoires2011-01-111-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently hid doesn't export the features it knows to the specific modules. Some information can be really important in such features: MosArt and Cypress devices are by default not in a multitouch mode. We have to send the value 2 on the right feature. This patch exports to the module the features report so they can find the right feature to set up the correct mode. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Acked-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: replace offsets values with their corresponding BTN_* definesFlorian Fainelli2010-12-141-6/+6
| | | | | | | | | | | | | | | | Instead of using magic values, use their corresponding BTN_* defines from linux/input.h. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'master' into upstreamJiri Kosina2010-12-101-41/+86
|\ \ | |/
| * Merge branch 'for-linus' of ↵Linus Torvalds2010-12-021-9/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: length resolution should be reported units/mm HID: add support for F430 Force Feedback Wheel HID: egalax: Use kzalloc HID: Remove KERN_DEBUG from dbg_hid use Manually fixed trivial conflict in drivers/hid/hid-input.c (due to removal of KERN_DEBUG from dbg_hid use clashing with new keycode interface switch)
| | * HID: length resolution should be reported units/mmDmitry Torokhov2010-12-021-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input ABI requires reporting resolution on main axes in units per millimeter, not units per inch, so we need to convert accordingly. Tested-by: Nikolai Kondrashov <spbnick@gmail.com> Acked-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| | * HID: Remove KERN_DEBUG from dbg_hid useJoe Perches2010-11-031-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | Merge branch 'for-linus' of ↵Linus Torvalds2010-10-251-33/+75
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (75 commits) Input: wacom - specify Cinitq supported tools Input: ab8500-ponkey - fix IRQ freeing in error path Input: adp5588-keys - use more obvious i2c_device_id name string Input: ad7877 - switch to using threaded IRQ Input: ad7877 - use attribute group to control visibility of attributes Input: serio - add support for PS2Mult multiplexer protocol Input: wacom - properly enable runtime PM Input: ad7877 - filter events where pressure is beyond the maximum Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting Input: ad7877 - implement specified chip select behavior Input: hp680_ts_input - use cancel_delayed_work_sync() Input: mousedev - correct lockdep annotation Input: ads7846 - switch to using threaded IRQ Input: serio - support multiple child devices per single parent Input: synaptics - simplify pass-through port handling Input: add ROHM BU21013 touch panel controller support Input: omap4-keypad - wake-up on events & long presses Input: omap4-keypad - fix interrupt line configuration Input: omap4-keypad - SYSCONFIG register configuration Input: omap4-keypad - use platform device helpers ...
| | * Input: hid-input - allow mapping unknown usagesDmitry Torokhov2010-09-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently HID layer only allows to remap keycodes for known usages, and responds with -EINVAL when user tries to map new usage code. This precludes us form relying on udev/keymap for establishing correct mappings and forces us to write dummy HID drivers responsible only for setting up keymaps. Let's allow remapping not only usages that have been set up as keys (usage->type == EV_KEY) but also yet-unmapped usages (usage->type == 0). Acked-by: Jarod Wilson <jarod@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| | * Input: hid-input - switch to using new keycode interfaceDmitry Torokhov2010-09-091-33/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switch HID code to use new style of getkeycode and setkeycode methods to allow retrieving and setting keycodes not only by their scancodes but also by index. Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | | HID: Add and use hid_<level>: dev_<level> equivalentsJoe Perches2010-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neaten current uses of dev_<level> by adding and using hid specific hid_<level> macros. Convert existing uses of dev_<level> uses to hid_<level>. Convert hid-pidff printk uses to hid_<level>. Remove err_hid and use hid_err instead. Add missing newlines to logging messages where necessary. Coalesce format strings. Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt Other miscellaneous changes: Add const struct hid_device * argument to hid-core functions extract() and implement() so hid_<level> can be used by them. Fix bad indentation in hid-core hid_input_field function that calls extract() function above. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | HID: add hid_hw_open/close/power() handlersDmitry Torokhov2010-12-081-2/+2
|/ / | | | | | | | | | | | | | | Instead of exposing the guts of hid->ll_driver relationship to HID sub-drivers provide these helpers to encapsulate the details. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'uc-logic' into for-linusJiri Kosina2010-10-231-0/+4
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-ids.h drivers/hid/hid-lg.c drivers/hid/usbhid/hid-quirks.c
| * | HID: Add Tablet Pick -> BTN_STYLUS2 mappingNikolai Kondrashov2010-08-091-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Many tablet input drivers use BTN_STYLUS2 code to report a second tablet stylus button. Yet, the generic HID input driver doesn't map it. Apparently, because there is no corresponding usage in the HID Usage Tables. This patch selects a compromise usage - "Tablet Pick" (0x46) to be mapped to BTN_STYLUS2. Some tablets use "Eraser" usage, but mapping it to a button wouldn't be entirely correct, because the specification says it may be "a pressure quantity". Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| |
| \
*-. \ Merge branches '3m', 'egalax', 'logitech', 'magicmouse', 'ntrig' and ↵Jiri Kosina2010-10-231-0/+3
|\ \ \ | | |/ | | | | | | 'roccat' into for-linus
| * | HID: Add a hid quirk for input sync overrideHenrik Rydberg2010-09-211-0/+3
| |/ | | | | | | | | | | | | | | | | | | As of lately, HID devices which send per-frame data split over several HID reports have started to emerge. This patch adds a quirk which allows the HID driver to take over the input layer synchronization, and hence the control of the frame boundary. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: add absolute axis resolution calculationNikolai Kondrashov2010-10-151-0/+80
|/ | | | | | | | | Add absolute axis resolution calculation to the core HID layer, according to HID specification v1.11 6.2.2.7 Global Items. Only exponent 1 length units for X/Y/Z/RX/RY/RZ axis are supported for now. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2010-08-041-9/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits) Revert "HID: add support for the Wacom Intuos 4 wireless" HID: fix up Kconfig entry for ACRUX driver HID: add ACRUX game controller force feedback support HID: Force input registration for "VEC footpedal" HID: add HID_QUIRK_HIDINPUT_FORCE HID: hid-input.c: indentation fixes HID: hiddev: use usb_find_interface, get rid of BKL HID: ignore digitizer usage Undefined (0x00) HID: Add support for Conceptronic CLLRCMCE HID: hid-ids.h: Whitespace fixup, align using TABs HID: picolcd: implement refcounting of framebuffer HID: picolcd: do not reallocate memory on depth change HID: picolcd: Add minimal palette required by fbcon on 8bpp HID: magicmouse: Correct parsing of large X and Y motions. HID: magicmouse: report last touch up HID: picolcd: fix deferred_io init/cleanup to fb ordering HID: hid-ids.h: keep vendor ids in alphabetical order HID: add proper support for Elecom BM084 bluetooth mouse HID: magicmouse: enable horizontal scrolling HID: magicmouse: add param for scroll speed ...
| *-. Merge branches 'magicmouse', 'roccat' and 'vec-pedal' into for-linusJiri Kosina2010-08-041-9/+9
| |\ \ | | | | | | | | | | | | | | | | Conflicts: drivers/hid/hid-ids.h
| | | * HID: hid-input.c: indentation fixesDaniel Mack2010-07-191-9/+9
| | |/ | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: ignore digitizer usage Undefined (0x00)Forest Bond2010-07-131-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMART Technologies has recommended this change to fix a problem reported with SMART Board series interactive whiteboards. A description of the device-specific symptom follows: When the board is connected my mouse bounces up to the top left corner. Bjorn has tested this fix with model SB680. Tested-by: Bjorn Behrendt <bbehrendt@msjvermont.org> Signed-off-by: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Input: hid-input - use a larger event buffer for MT devicesHenrik Rydberg2010-06-231-0/+3
|/ | | | | | | | | | | The MT devices produce a lot of data. Tell the underlying input device approximately how many events will be sent per synchronization, to allow for better buffering. The number is a template based on continuously reporting details for each finger on a single hand. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: scancode in get/set_keycodes should be unsignedDmitry Torokhov2010-03-081-12/+12
| | | | | | | | | | | | The HID layer has some scan codes of the form 0xffbc0000 for logitech devices which do not work if scancode is typed as signed int, so we need to switch to unsigned it instead. While at it keycode being signed does not make much sense either. Acked-by: Márton Németh <nm127@freemail.hu> Acked-by: Matthew Garrett <mjg@redhat.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* HID: extend mask for BUTTON usage pageJiri Kosina2010-02-171-1/+1
| | | | | | | | | Now that joystick button usages can expand over 15 buttons, we have to properly mask out the code from hid usage to cover the whole 0xffff available space. Reported-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: add mapping for "AL Network Chat" usageLeo P White2010-02-091-0/+1
| | | | | | | | | Adding a mapping for the 'AL Network Chat' usage from the 'Consumer' usage page (USB HID Usage Tables v1.11). This usage is used by some keyboards for a multimedia key. Signed-off-by: Leo P White <lpw25@cam.ac.uk> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: update copyrightJiri Kosina2010-02-021-1/+1
| | | | Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: handle joysticks with large number of buttonsJiri Kosina2010-01-041-1/+6
| | | | | | | | | | | | | | | | | | Current HID code doesn't properly handle HID joysticks which have larger number of buttons than what fits into current range reserved for BTN_JOYSTICK. One such joystick reported to not work properly is Saitek X52 Pro Flight System. We can't extend the range to fit more buttons in, because of backwards compatibility reasons. Therefore this patch introduces a new BTN_TRIGGER_HAPPY range, and uses these to map the buttons which are over BTN_JOYSTICK limit. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [for the input.h part] Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: use debugfs for report dumping descriptorJiri Kosina2009-06-121-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a little bit inconvenient for people who have some non-standard HID hardware (usually violating the HID specification) to have to recompile kernel with CONFIG_HID_DEBUG to be able to see kernel's perspective of the HID report descriptor and observe the parsed events. Plus the messages are then mixed up inconveniently with the rest of the dmesg stuff. This patch implements /sys/kernel/debug/hid/<device>/rdesc file, which represents the kernel's view of report descriptor (both the raw report descriptor data and parsed contents). With all the device-specific debug data being available through debugfs, there is no need for keeping CONFIG_HID_DEBUG, as the 'debug' parameter to the hid module will now only output only driver-specific debugging options, which has absolutely minimal memory footprint, just a few error messages and one global flag (hid_debug). We use the current set of output formatting functions. The ones that need to be used both for one-shot rdesc seq_file and also for continuous flow of data (individual reports, as being sent by the device) distinguish according to the passed seq_file parameter, and if it is NULL, it still output to kernel ringbuffer, otherwise the corresponding seq_file is used for output. The format of the output is preserved. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: move connect quirksJiri Slaby2008-10-141-11/+12
| | | | | | | | | Move connecting from usbhid to the hid layer and fix also hidp in that manner. This removes all the ignore/force hidinput/hiddev connecting quirks. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: remove hid-input-quirksJiri Slaby2008-10-141-10/+1
| | | | | | | Remove the file since these is no user now. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: move a4tech quirksJiri Slaby2008-10-141-9/+0
| | | | | Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: move cypress quirksJiri Slaby2008-10-141-3/+3
| | | | | Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
OpenPOWER on IntegriCloud