Commit Graph

883 Commits (aa43c2158d5ae1dc76cccb08cd57a3ffd32c3825)

Author SHA1 Message Date
Jiri Kosina 6cb4b04079 HID: hiddev: fix race between hiddev_disconnect and hiddev_release
When hiddev_disconnect() runs with chardev open, it will proceed with
usbhid_close(). When userspace in parallel runs the hiddev_release(),
it sees !hiddev->exists (as it has been already set so by
hiddev_disconnect()) and kfrees hiddev while hiddev_disconnect() hasn't
finished yet.

Serialize the access to hiddev->exists and hiddev->open by existancelock.

Reported-by: mike-@cinci.rr.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-20 10:50:13 +02:00
Jiri Kosina 23746a66d7 HID: magicmouse: ignore 'ivalid report id' while switching modes
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

Tested-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-20 10:28:00 +02:00
Armando Visconti 966922f26c HID: fix a crash in hid_report_raw_event() function.
I'm using a Data Modul EasyTouch USB multitouch controller,
which is issuing a hid report with a size equals to 0. The rsize
value gets set to 536870912 and Linux is crashing in the memset
because the value is too big.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-20 10:25:23 +02:00
Benjamin Tissoires c04abeeff9 HID: hid-multitouch: add support for Elo TouchSystems 2515 IntelliTouch Plus
This patch adds support for Elo TouchSystems 2515 IntelliTouch Plus
that can be found in Lenovo A700 all-in-one.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-19 11:54:55 +02:00
Jarod Wilson 437f3b199c HID: assorted usage updates from hut 1.12
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>
2011-05-18 17:07:34 +02:00
Jiri Kosina 6b7b8e488b Merge branch 'master' into upstream.
This is sync with Linus' tree to receive KEY_IMAGES definition
that went in through input tree.
2011-05-18 17:06:49 +02:00
Stefan Achatz b50f315cbb HID: roccat: fix actual/startup profile sysfs attribute in koneplus
startup_profile and actual_profile didn't work as expected. Also
as the actual profile is persistent, the distinction between the
two was ambiguous, so both use the same code now and startup_profile
has been deprecated. Also the event is now propagated through
chardev. The userland tool has been updated to support this change.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-18 16:34:06 +02:00
Benjamin Tissoires df167c4a0d HID: hid-multitouch: Add support for Lumio panels
This patch enables support for Lumio optical devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-18 15:35:51 +02:00
Daniel Mack dd2ed487fd HID: 'name' and 'phys' in 'struct hid_device' can never be NULL
As they are static members of fix size, there is no need to NULL-check them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-18 13:23:31 +02:00
Austin Zhang 4e61f0d75a HID: hid-multitouch: add support for Ilitek dual-touch panel
Added ILITEK hid dual touch panel support into hid-multitouch.

Signed-off-by: Austin Zhang <zhang.austin@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-09 17:56:50 +02:00
Bruno Prémont 8c4e708d01 HID: picolcd: Avoid compile warning/error triggered by copy_from_user()
With CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y compilation of PicoLCD
driver fails on copy_from_user(), without it a warning is generated:

  CC [M]  drivers/hid/hid-picolcd.o
In file included from /usr/src/linux-2.6/arch/x86/include/asm/uaccess.h:571,
                 from /usr/src/linux-2.6/arch/x86/include/asm/sections.h:5,
                 from /usr/src/linux-2.6/arch/x86/include/asm/hw_irq.h:26,
                 from /usr/src/linux-2.6/include/linux/irq.h:359,
                 from /usr/src/linux-2.6/arch/x86/include/asm/hardirq.h:5,
                 from /usr/src/linux-2.6/include/linux/hardirq.h:7,
                 from /usr/src/linux-2.6/include/linux/interrupt.h:12,
                 from /usr/src/linux-2.6/include/linux/usb.h:15,
                 from /usr/src/linux-2.6/drivers/hid/hid-picolcd.c:25:
In function 'copy_from_user',
    inlined from 'picolcd_debug_eeprom_write' at drivers/hid/hid-picolcd.c:1592:
arch/x86/include/asm/uaccess_32.h:212: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

gcc-4.4.5 is not able to track size calculation when it is stored into
a variable, thus tell copy_from_user() maximum size via
min(*max-size*, *effective-size*) explicitly and inline how much to copy
at most.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-05 13:45:52 +02:00
Michael Hund ce97cac813 USB: ldusb: add several new devices
Added several new devices to ldusb and excluded them from the HID driver.

Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-03 10:12:00 -07:00
Peter Gundermann fdc6807fcd HID: add support for Logitech G27 wheel
Gere's a small patch to add support for the Logitech G27 wheel, since
the prior patch only added FF support for the Driving Force Pro and G25.
The patch contains the changes from the G25 and DFP, too.

I tested the changes with wine/LFS and got full support for all axes and
buttons.

Signed-off: Peter Gundermann <slim-one@users.sourceforge.net>

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-03 10:15:03 +02:00
Peter Waechtler 06268b2a38 HID: hiddev: fix error path in hiddev_read when interrupted
hiddev_read: in case mutex_lock_interruptible will be interrupted
remove the task from the wait queue.

Signed-off-by: Peter Waechtler <pwaechtler@mac.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-29 13:53:53 +02:00
Jiri Kosina 35dca5b4a6 HID: add support for Sony Navigation Controller
Sony Navigation Controller needs a special report to be sent to it
before it is able to operate, the same way as other Sony controllers
do.

Tested-by: Jacek Lukas Wotka <jlw@team-fatal.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-28 15:43:13 +02:00
Jiri Kosina 4b5730fafb HID: add support for barcode scanners from Symbol Technologies
Barcode handheld scanners produced by Symbol Technologies (0x05e0/0x0800
and 0x05e0/0x1300) need HID_QUIRK_NOGET, otherwise their firmware exposes
trouble during enumeration/initialization.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-26 10:51:28 +02:00
Benjamin Tissoires 4a6ee685fb HID: hid-multitouch: merge hid-mosart into hid-multitouch
This patch include MosArt devices into hid-multitouch.
MosArt devices now support mt-protocol B.

We also need to introduce a new quirk for mosart devices to support
their contactID.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-22 14:14:52 +02:00
John Sung 6ab3a9a63f HID: hid-multitouch: add support for PenMount dual-touch panel
This patch adds PenMount support to hid-multitouch.  A new class
MT_CLS_CONFIDENCE is defined for PenMount, since it uses HID_DG_CONFIDENCE as
the valid flag.

Signed-off-by: John Sung <penmount.touch@gmail.com>
[benjamin.tissoires@enac.fr: rebased on top of last_index_field changes]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-22 11:56:52 +02:00
Benjamin Tissoires 2955caed8b HID: hid-multitouch: refactor last_field_index
the current implementation requires the devices to report
HID_DG_CONTACTCOUNT to set the last_field_index value.
However, devices reporting in serial mode (DWAV and PenMount)
do not send this field.
Other devices (3M) add other fields in the reports descriptor
that are not multitouch related at the end, thus the need to
add a special case in the default case when handling events.

A first work around has been set up but with PenMount devices,
we have reached the limit.

The idea is to calculate the last_field_index by relying only on
multitouch fields the device send. This allows us to remove
the handling of non-multitouch events in hid-multitouch, and
guarantee that the function mt_emit_event is always called.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-and-tested-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-22 11:54:42 +02:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Linus Torvalds 2b9accbee5 Merge branch 'for-linus' of 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: Add support for CH Pro Throttle
  HID: hid-magicmouse: Increase evdev buffer size
  HID: add FF support for Logitech G25/G27
  HID: roccat: Add support for wireless variant of Pyra
  HID: Fix typo Keyoutch -> Keytouch
  HID: add support for Skycable 0x3f07 wireless presenter
2011-04-07 09:42:13 -07:00
Jiri Kosina da60325d83 HID: Add support for CH Pro Throttle
CH Pro Throttle needs NOGET the same way as other products from
the same vendor require.

Reported-by: Unavowed <unavowed@vexillium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-06 07:12:32 -07:00
Chase Douglas cc5e0f08ca HID: hid-magicmouse: Increase evdev buffer size
The evdev buffer isn't big enough when you get many fingers on the
device. Bump up the buffer to a reasonable size, matching what other
multitouch devices use. Without this change, events may be discarded in
the evdev buffer before they are read.

Reported-by: Simon Budig <simon@budig.de>
Cc: Henrik Rydberg <rydberg@euromail.se>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: stable@kernel.org
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-06 06:17:45 -07:00
Simon Wood 1478d82df8 HID: add FF support for Logitech G25/G27
Small patch to add support for the G25/G27 by adding USB ID's
as suggested by Peter.

Boots but otherwise untested as I don't have hardware, .debs for
kernel (2.6.38) here if want to test/run Ubuntu/Debian:
http://www.mungewell.org/Logitech_Wii_Wheel/

Reported-by: Peter Gundermann <slim-one@users.sourceforge.net>
Signed-off-by: Simon Wood <simon@mungewell.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-01 15:51:10 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Jiri Kosina d2a1cfebe3 HID: hidraw: fix comments
Adjust the comments a little bit.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-27 20:30:32 +02:00
Dan Carpenter ac065bf214 HID: hiddev: fix brace indent
There was an extra tab so the close curly brace didn't match up with
the right if statement.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-27 11:14:40 +02:00
Stefan Achatz 3fce224608 HID: roccat: Add support for wireless variant of Pyra
Wireless variant of Roccat Pyra finally has been tested with
existing driver.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-24 12:47:46 +01:00
Benjamin Tissoires f786bba449 HID: hid-multitouch: migrate 3M PCT touch screens to hid-multitouch
This patch merges the hid-3m-pct driver into hid-multitouch.
To keep devices working the same way they used to with hid-3m-pct,
we need to add two signal/noise ratios for width and height.
We also need to work on width/height to send proper
ABS_MT_ORIENTATION flag.

Importing 3M into hid-multitouch also solved the bug in which
devices handling width and height in their report descriptors
did not show ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Stéphane Chatty <chatty@enac.fr>
Reviewed-and-tested-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-24 12:44:45 +01:00
Matthew Garrett bb7ca747f8 backlight: add backlight type
There may be multiple ways of controlling the backlight on a given
machine.  Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:43:59 -07:00
Stephen Boyd 3d366e2860 HID: Fix typo Keyoutch -> Keytouch
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-22 10:34:23 +01:00
Benjamin Tissoires 1e648a1372 HID: hid-multitouch: refactor initialization of ABS_MT_ORIENTATION
The way the input_set_abs_params was called for the new composite field
ABS_MT_ORIENTATION was not very clear at second reading.  We can remove the
non-necessary call to set_abs and use the simple call to input_set_abs_params.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-21 17:07:29 +01:00
Benjamin Tissoires a841b62c5d HID: hid-multitouch: migrate Cando dual touch panels to hid-multitouch
This patch merges hid-cando into the unified multitouch driver.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Stéphane Chatty <chatty@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-21 17:05:51 +01:00
Benjamin Tissoires 043b403aed HID: hid-multitouch: migrate support for Stantum panels to the unified driver.
This patch merges hid-stantum to the generic multitouch driver.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Stéphane Chatty <chatty@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-21 17:05:02 +01:00
Benjamin Tissoires 9498f954a4 HID: hid-multitouch: Auto detection of maxcontacts
This patch enables support of autodetection of maxcontacts.
When adding support for a new device, one is now able to let
the device tell how many contacts it supports, or to manually
set the value if the device happens to provide wrong information.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Stéphane Chatty <chatty@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-21 17:04:25 +01:00
Jiri Kosina d586dca06a HID: add support for Skycable 0x3f07 wireless presenter
This device contains the very same bug in report descriptor as the
Ortek ones do (i.e. LogicalMinimum == 1, which is wrong for the key
array).

As we have more reports for the Ortek devices, we are keeping the driver
name for now. Apparently there is a chip producer which sells chip with
this buggy descriptor to multiple vendors. Thus if such reports start
to come at highger frequency, we'll either have to rename the driver
accordingly, or come up with more generic workaround.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-21 16:12:23 +01:00
Linus Torvalds a952baa034 Merge branch 'for-linus' of 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
  ...
2011-03-19 22:27:06 -07:00
Linus Torvalds 7fd23a2471 Merge branch 'for-linus' of 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: (48 commits)
  HID: add support for Logitech Driving Force Pro wheel
  HID: hid-ortek: remove spurious reference
  HID: add support for Ortek PKB-1700
  HID: roccat-koneplus: vorrect mode of sysfs attr 'sensor'
  HID: hid-ntrig: init settle and mode check
  HID: merge hid-egalax into hid-multitouch
  HID: hid-multitouch: Send events per slot if CONTACTCOUNT is missing
  HID: ntrig remove if and drop an indent
  HID: ACRUX - activate the device immediately after binding
  HID: ntrig: apply NO_INIT_REPORTS quirk
  HID: hid-magicmouse: Correct touch orientation direction
  HID: ntrig don't dereference unclaimed hidinput
  HID: Do not create input devices for feature reports
  HID: bt hidp: send Output reports using SET_REPORT on the Control channel
  HID: hid-sony.c: Fix sending Output reports to the Sixaxis
  HID: add support for Keytouch IEC 60945
  HID: Add HID Report Descriptor to sysfs
  HID: add IRTOUCH infrared USB to hid_have_special_driver
  HID: kernel oops in out_cleanup in function hidinput_connect
  HID: Add teletext/color keys - gyration remote - EU version (GYAR3101CKDE)
  ...
2011-03-18 10:35:30 -07:00
Jiri Kosina 65b06194c9 Merge branches 'dragonrise', 'hidraw-feature', 'multitouch', 'ntrig', 'roccat', 'upstream' and 'upstream-fixes' into for-linus 2011-03-17 14:31:46 +01:00
Jiri Kosina 5623a24a80 HID: add support for Logitech Driving Force Pro wheel
Add force feedback support for Logitech Driving Force Pro wheel.

Device IDs reported by Michal Malý.

Reported-by: Michal Malý <madcatxster@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-17 00:43:23 +01:00
Jiri Kosina e96838df55 HID: hid-ortek: remove spurious reference
Remove spurious bugzilla reference from the source comment header.

Also fix the comment to be more correct (it's HID report descriptor
rather than USB).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-17 00:39:33 +01:00
Herton Ronaldo Krzesinski 270fdc0748 HID: add support for Ortek PKB-1700
As reported on http://ubuntuforums.org/showthread.php?t=1594007 the
PKB-1700 needs same special handling as WKB-2000. This change is
originally based on patch posted by user asmoore82 on the Ubuntu
forums.

Cc: stable@kernel.org
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-17 00:32:42 +01:00
Stefan Achatz 61c29f5b18 HID: roccat-koneplus: vorrect mode of sysfs attr 'sensor'
Mode of sysfs attribute 'sensor' was wrongly set to writeonly.
Corrected this to readwrite.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-15 15:41:20 +01:00
Rafi Rubin 7b2a64c96a HID: hid-ntrig: init settle and mode check
Adding a wait before the wakeup signal.

As a precautionary measure sanity check the current sensor mode.  If
needed reset it to "dual".

When the device is responding poorly and needs the wakeup call, it was
missing it.  Giving it a chance to settle first improves the chances
that signal gets through.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-14 13:10:13 +01:00
Richard Nauber 4875ac114d HID: merge hid-egalax into hid-multitouch
This patch merges the hid-egalax driver into hid-multitouch.  There
are two types of devices support by the hid-egalax driver: resistive
and capacitive. Here, they are implicitly distinguished by the absence
of a HID_DG_CONTACTCOUNT field in the latter, so no special code path
needs to be introduced.

As a side effect, this patch fixes the broken suspend/resume behavior
in the old driver.

[rydberg@euromail.se: minor fixups]
Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-14 13:05:08 +01:00
Henrik Rydberg f153fc3990 HID: hid-multitouch: Send events per slot if CONTACTCOUNT is missing
The recent capacitive DWAV firmwares do not use the CONTACTCOUNT
field, and the touch frame boundary can therefore not be determined.
This patch makes the driver report the touch frame at each completed
slot instead.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-14 13:05:07 +01:00
Rafi Rubin ff4046294b HID: ntrig remove if and drop an indent
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-14 12:58:15 +01:00
Andy Botting 47340bd9fe Input: bcm5974 - add support for MacBookPro8
This patch add multitouch support for the MacBookPro8,1 and
MacBookPro8,2 models.

Cc: stable@kernel.org
Signed-off-by: Andy Botting <andy@andybotting.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:30 -08:00
Dmitry Torokhov 0ae4381097 HID: ACRUX - activate the device immediately after binding
This device does not tolerate delayed opening and goes into a coma if
we try to that. Ubuntu even has a crutch for udev that opened the device
upon seeing it for the first time, but it did not work if we happened to
boot with the device attached, since by the time userspace got around
opening the device it was too late. Let's start the device immediately
to deal with this issue.

Reported-by: Sergei Kolzun <x0r@dv-life.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-12 21:47:18 +01:00
Rafi Rubin 6638dedaec HID: ntrig: apply NO_INIT_REPORTS quirk
Probing reports does bad things with some ntrig firmwares, better to
just leave them alone.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-10 11:37:55 +01:00
Henrik Rydberg 2d9ca4e9f3 HID: hid-magicmouse: Correct touch orientation direction
The magic trackpad and mouse both report touch orientation in opposite
direction to the bcm5974 driver and what is written in
Documents/input/multi-touch-protocol.txt. This patch reverts the
direction, so that all in-kernel devices with this feature behave the
same way.

Since no known application has been utilizing this information yet, it
seems appropriate also for stable.

Cc: stable@kernel.org
Cc: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-10 00:05:59 +01:00
Rafi Rubin f41a52d301 HID: ntrig don't dereference unclaimed hidinput
Check before dereferencing field->hidinput to fix a reported invalid
deference bug.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-08 14:36:31 +01:00
Henrik Rydberg f635bd11c8 HID: Do not create input devices for feature reports
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>
2011-03-01 17:25:39 +01:00
Antonio Ospite 5710fabf31 HID: hid-sony.c: Fix sending Output reports to the Sixaxis
The Sixaxis does not want the report_id as part of the data packet in
Output reports, so we have to discard buf[0] when sending the actual
control message.

Add also some documentation about that and about why
hdev->hid_output_raw_report needs to be overridden.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-21 13:48:50 +01:00
Jiri Kosina 177900e8c9 HID: add support for Keytouch IEC 60945
The keyboard has several bugs in its report descriptor, most
importantly the Logical Min/Max are completely off.

Replace it with simplified descriptor which describes it properly.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-17 15:12:45 +01:00
Alan Ott 6d3bfb7434 HID: Add HID Report Descriptor to sysfs
Add a new binary sysfs entry called report_descriptor which contains
the HID report descriptor.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-17 13:23:14 +01:00
Benjamin Tissoires b2e7617e09 HID: add IRTOUCH infrared USB to hid_have_special_driver
Without this patch, the device is handled by hidinput and does
not have the right behavior.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-16 18:38:21 +01:00
Benjamin Tissoires d9236303d0 HID: kernel oops in out_cleanup in function hidinput_connect
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>
2011-02-15 23:47:05 +01:00
Steffen Barszus 6497dc3a54 HID: Add teletext/color keys - gyration remote - EU version (GYAR3101CKDE)
This patch adds support for 5 keys which can be found
only on the EU version of the gyration remote, which has been not
mapped before.

Signed-off-by: Steffen Barszus <steffenbpunkt[AT]googlemail[DOT]com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-15 10:29:57 +01:00
Chris Schlund 8ef3953108 HID: hid-lcpower: fix key mapping
I already got some feedback for this module, telling me red and blue keys are
exchanged.  I checked it, and they are right. Due to my incorrect userspace
settings I missed this during my testing.

Signed-off-by: Chris Schlund <chrisschlund@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-13 15:04:51 +01:00
Alan Ott b4dbde9da8 HID: Add Support for Setting and Getting Feature Reports from hidraw
Per the HID Specification, Feature reports must be sent and received on
the Configuration endpoint (EP 0) through the Set_Report/Get_Report
interfaces.  This patch adds two ioctls to hidraw to set and get feature
reports to and from the device.  Modifications were made to hidraw and
usbhid.

New hidraw ioctls:
  HIDIOCSFEATURE - Perform a Set_Report transfer of a Feature report.
  HIDIOCGFEATURE - Perform a Get_Report transfer of a Feature report.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-11 15:05:49 +01:00
Chris Schlund 75b0702246 HID: add support for wireless remote LC Power model RC1000MCE
Signed-off-by: Chris Schlund <chrisschlund@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:41:59 +01:00
Stefan Achatz 5dc0c9835f HID: roccat: Rename header roccat.h -> hid-roccat.h
It was desired that the header roccat.h should be named hid-roccat.h

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:28 +01:00
Stefan Achatz e6fa47af55 HID: roccat: Fix bug that prevented roccat chardev from removing devices
pointer to device was cleared too early. This is fixed now.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:28 +01:00
Stefan Achatz 74b643dac4 HID: roccat: Fix NULL pointer dereference when unloading module
Class was destroyed before starting the unregistering driver chain.
Disconnecting a device from roccat chardev in this process then
raised a NULL pointer dereference.
Fixed this by destroying class after unregistering driver.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:28 +01:00
Stefan Achatz 8211e46004 HID: roccat: Add ioctl command to retreive report size from chardev
Roccat chardev was reworked to support only a defined report size per
device and this can be retreived by an ioctl now to enable future changes
in report definitions.
Header was moved/renamed from drivers/hid to include/linux for accessibility.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:28 +01:00
Stefan Achatz 432762e28b HID: roccat: Increase waiting time for Kone[+] to prevent occasional freezes
On newer kernels the device freezes occasionally on initialization with just
70msec between reads. Increased this value to safe 100msec.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:27 +01:00
Stefan Achatz 0e70f97f25 HID: roccat: Add support for Kova[+] mouse
This patch adds support for Roccat Kova[+] mouse.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:27 +01:00
Stefan Achatz 5772f63613 HID: roccat: Introduce module hid-roccat-common
Module hid-roccat-common contains functions used by roccat device driver
modules to reduce code duplication.
At the moment it contains just two wrapper methods for usb_control_msg
that ensure that the buffer used for transfer is dma capable which wasn't
the case before.
The kconfig option is not visible to the user but will be selected by the
device specific drivers.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:27 +01:00
Stefan Achatz a28764ef80 HID: roccat: Use new hid_err macros
Using the new hid_err macros instead of dev_err.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:27 +01:00
Stefan Achatz cb38cd8786 HID: roccat: Remove empty function definitions for roccat chardev
Roccat chardev is a dependency of all device specific drivers, so
the empty definitions are not needed anymore.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-03 16:37:26 +01:00
Stefan Achatz 3a22ebe9cc HID: hidraw: fix hidraw_disconnect()
hidraw_disconnect() first sets an entry in hidraw_table to NULL
and calls device_destroy() afterwards. The thereby called
hidraw_release() tries to read this already cleared value resulting
in never removing any device from the list.
This got fixed by changing the order of events.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-01 11:16:51 +01:00
Nikolai Kondrashov b4a65f4ef5 HID: update dragonrise Kconfig description
Add list of (supposedly) supported gamepads to dragonrise driver Kconfig
description.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-01 11:01:06 +01:00
Nikolai Kondrashov e05eefb9be HID: add support for DragonRise PID 0011 gamepad
Add support for DragonRise Inc. gamepad with USB PID 0x0011 by fixing its report
descriptor. This mainly removes spurious axis.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-01 11:01:06 +01:00
Nikolai Kondrashov 152fd6347e HID: rename hid-drff.c to hid-dr.c
Rename drivers/hid/hid-drff.c (a DragonRise Inc. force feedback gamepad driver)
to driver/hid/hid-dr.c.

This prepares it for addition of support for another gamepad, without force
feedback.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-02-01 11:01:06 +01:00
Dmitry Torokhov aebd636bd6 Input: switch completely over to the new versions of get/setkeycode
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>
2011-01-31 21:16:59 -08:00
Alan Ott cf28a67366 HID: hidraw: Replace Confusing += Operator with =
Setting of the return value of hidraw_read() uses the += operator when
= is more appropriate.  There is no case where ret can be anything
other than zero when the assignment is made, making = equivalent to
+= and much more clear.

Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-31 15:43:46 +01:00
Benjamin Tissoires 4dfcced8a1 HID: hid-multitouch: introduce IrTouch Infrared USB device
This patch adds support for IrTouch 42 inches.

Tested-by: Victor Zhuk <v.zhuk@acs-ltd.ru>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-31 15:16:13 +01:00
Benjamin Tissoires ef2fafb3e2 HID: hid-multitouch: add Benjamin Tissoires as module_author
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-31 15:16:08 +01:00
Benjamin Tissoires 1e9cf35b99 HID: hid-multitouch: Rename MT_CLS_DUAL1 and MT_CLS_DUAL2
This patch renames MT_CLS_DUAL1 to MT_CLS_DUAL_INRANGE_CONTACTID
and MT_CLS_DUAL2 to MT_CLS_DUAL_INRANGE_CONTACTNUMBER for better
readability.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-31 15:16:08 +01:00
Benjamin Tissoires b79b36be56 HID: hid-multitouch: change default mt_class
The safest quirk for a device (the one that works out of the box for
most of them) is MT_QUIRK_NOT_SEEN_MEANS_UP. Indeed, it does not
make any assumption on the device. When adding a new device, we can
easily test it against MT_CLS_DEFAULT, and then optimize it with other
quirks: that's why no device use MT_CLS_DEFAULT right now.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-31 15:16:08 +01:00
David Rientjes 6a108a14fa kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
is used to configure any non-standard kernel with a much larger scope than
only small devices.

This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
references to the option throughout the kernel.  A new CONFIG_EMBEDDED
option is added that automatically selects CONFIG_EXPERT when enabled and
can be used in the future to isolate options that should only be
considered for embedded systems (RISC architectures, SLOB, etc).

Calling the option "EXPERT" more accurately represents its intention: only
expert users who understand the impact of the configuration changes they
are making should enable it.

Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: David Woodhouse <david.woodhouse@intel.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Greg KH <gregkh@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Robin Holt <holt@sgi.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-20 17:02:05 -08:00
Stefan Achatz fd82be6c0a HID: roccat: Fix an error message when reading more data from bin attributes
Using cat or something to read from binary attributes would try to do an
additional read with offset equal to filesize. This resulted in an invalid
attribute error. This is fixed by giving the right answer instead of EINVAL.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-20 11:28:53 +01:00
Stefan Achatz e68cc603b0 HID: roccat: Add support for Roccat Arvo keyboard
This patch add support for Roccat Arvo keyboard. Arvo has 5 additional
configurable buttons and the ability to deactivate certain keys.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-20 11:27:54 +01:00
Vasiliy Kulikov dacfecdbf3 HID: hid-roccat-koneplus: potential NULL dereference
kmalloc() may fail, if so return -ENOMEM.
Also koneplus_init_koneplus_device_struct() should check return code
of koneplus_get_startup_profile() and propagate its return code.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-17 13:20:43 +01:00
Linus Torvalds 8f685fbda4 Merge branch 'for-linus' of 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
2011-01-13 09:58:38 -08:00
Benjamin Tissoires 2d93666e70 HID: hid-multitouch: minor fixes based on additional review
* amended Kconfig (PixCir and Hanvon are the same panel but with
  different name)
* insert field name in mt_class and retrieving it in mt_probe
* add 2 quirks: MT_QUIRK_VALID_IS_INRANGE, MT_QUIRK_VALID_IS_CONFIDENCE,
  in order to find the field "valid"
* inlined slot_is_contactid and slot_is_contact_number
* cosmetics changes (tabs and comments)
* do not send unnecessary properties once the touch is up

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:56 +01:00
Benjamin Tissoires c64f6f934c HID: Switch turbox/mosart touchscreen to hid-mosart
This device used the MULTI_INPUT quirk whereas it could be used
with hid-mosart instead to support the multitouch part.

Reference: https://bugs.launchpad.net/ubuntu/+bug/620609/

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:55 +01:00
Benjamin Tissoires bc5ab083a6 HID: add Add Cando touch screen 10.1-inch product id
This device has been reported to be an hid-cando one.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:55 +01:00
Benjamin Tissoires 5572da08a7 HID: hid-mulitouch: add support for the 'Sensing Win7-TwoFinger'
Added support for the 'Sensing Win7-TwoFinger' panel by GeneralTouch found on some tablets.

Because of conflicting VID/PID, this conflicts with previous support for some
single-touch panels by GeneralTouch

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:55 +01:00
Benjamin Tissoires a3b5e577d9 HID: hid-multitouch: add support for Cypress TrueTouch panels
Added support for Cypress TrueTouch panels, which detect up to 10 fingers

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:54 +01:00
Benjamin Tissoires 5519cab477 HID: hid-multitouch: support for PixCir-based panels
Created a driver for PixCir based dual-touch panels, including the one
in the Hanvon tablet.  This is done in a code structure aimed at unifying
support for several existing HID multitouch panels.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-11 21:26:54 +01:00
Benjamin Tissoires 0d2689c0f0 HID: add feature_mapping callback
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>
2011-01-11 21:26:53 +01:00
Linus Torvalds facc7a96d4 Merge branch 'for-linus' of 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: (34 commits)
  HID: roccat: Update sysfs attribute doc
  HID: roccat: don't use #pragma pack
  HID: roccat: Add support for Roccat Kone[+] v2
  HID: roccat: reduce number of functions in kone and pyra drivers
  HID: roccat: declare meaning of pack pragma usage in driver headers
  HID: roccat: use class for char device for sysfs attribute creation
  sysfs: Introducing binary attributes for struct class
  HID: hidraw: add compatibility ioctl() for 32-bit applications.
  HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
  HID: picolcd: fix misuse of logical operation in place of bitop
  HID: usbhid: base runtime PM on modern API
  HID: replace offsets values with their corresponding BTN_* defines
  HID: hid-mosart: support suspend/resume
  HID: hid-mosart: ignore buttons report
  HID: hid-picolcd: don't use flush_scheduled_work()
  HID: simplify an index check in hid_lookup_collection
  HID: Hoist assigns from ifs
  HID: Remove superfluous __inline__
  HID: Use vzalloc for vmalloc/memset(,0...)
  HID: Add and use hid_<level>: dev_<level> equivalents
  ...
2011-01-10 08:15:37 -08:00
Jiri Kosina 4d04310189 HID: roccat: don't use #pragma pack
Replace #pragma pack ocurences with __atribute__((__packed__));

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-08 01:18:35 +01:00
Stefan Achatz 47dbdbffe1 HID: roccat: Add support for Roccat Kone[+] v2
This patch adds support for Roccat Kone[+] gaming mouse. Kone[+] is an enhanced version
of the old Kone with more memory for macros, a better sensor and more functionality.
This driver is conceptual similar to the existing Kone and Pyra drivers.
Userland tools can soon be found at http://sourceforge.net/projects/roccat

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-08 01:18:28 +01:00
Stefan Achatz 14a057f80f HID: roccat: reduce number of functions in kone and pyra drivers
The profile number is now passed via bin_attribute->private instead
of function parameter to reduce number of functions.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-08 01:11:33 +01:00
Stefan Achatz bd3a2b9663 HID: roccat: declare meaning of pack pragma usage in driver headers
Using pack pragma to prevent padding bytes in binary data structures
used for hardware communication. Explanation of these pragmas was requested.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-08 01:11:24 +01:00
Stefan Achatz 5012aada50 HID: roccat: use class for char device for sysfs attribute creation
Adding sysfs attributes to an already created device raises no userland
notification. Now the device drivers associate the devices attributes
with a class and use this for roccat event char device creation.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-08 01:11:00 +01:00
Jiri Kosina a7153258b7 Merge branches 'upstream' and 'upstream-fixes' into for-linus 2011-01-08 01:08:19 +01:00