The newest version of the accompanying userland tools cuts backward
compatibility and uses libudev to find its devices superseding the
quirky kone_abi_version sysfs attribute. Therefore it should be removed.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The path around the loop ends with the lock held, so the call to mutex_lock
is moved before the beginning of the loop.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@locked@
expression E1;
position p;
@@
read_lock(E1@p,...);
@r exists@
expression x <= locked.E1;
expression locked.E1;
expression E2;
identifier lock;
position locked.p,p1,p2;
@@
*lock@p1 (E1@p,...);
... when != E1
when != \(x = E2\|&x\)
*lock@p2 (E1,...);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Scroll acceleration is unique to the magicmouse driver, and is
unintuitive to a user who is unaware of the functionality. Thus, disable
it by default, but add a module parameter to enable it for power users
who want it.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Previously, scroll events only occurred when the user moved a touch
along the middle of the touch surface. This is unintuitive for a normal
user who is not aware of this. The device has a uniform surface, so the
distinction is artificial. This change removes the touch area check for
a scroll event, which replicates the OS X behavior.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
While the hardcoded ignore list is checked in hid_add_device(), the
user supplied ignore flags are not. Thus, the IGNORE quirk (0x0004)
cannot be used to stop usbhid from binding devices like iBuddy, which
has been recently removed from the ignore list due to product ID
conflict.
This patch adds the user quirk check to hid_add_device(), and makes
hid_add_device() return -ENODEV when HID_QUIRK_IGNORE bit is set.
HID_QUIRK_NO_IGNORE still takes precedence over HID_QUIRK_IGNORE.
With the patch, iBuddy works properly using libusb when the following
option is added to modprobe.d:
options usbhid quirks=0x1130:0x0002:0x0004
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hid-roccat-kone calls the hid-roccat module interfaces,
so the former should depend on or select the latter to prevent
build errors, like:
hid-roccat-kone.c:(.text+0x133ed2): undefined reference to `roccat_report_event'
hid-roccat-kone.c:(.text+0x133fa8): undefined reference to `roccat_disconnect'
hid-roccat-kone.c:(.text+0x1353be): undefined reference to `roccat_connect'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Renamed the sysfs attribute kone_driver_version to kone_abi_version and
simplified returned data to integer.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Fixed the following warning of checkpatch.pl:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Removed comment that is obsolete since roccat char device is
implemented
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: usbtouchscreen - support bigger iNexio touchscreens
Input: ads7846 - return error on regulator_get() failure
Input: twl4030-vibra - correct the power down sequence
Input: enable onkey driver of max8925
Input: use ABS_CNT rather than (ABS_MAX + 1)
Module roccat is a char device used to report special events of roccat hardware
to userland. These events include requests for on-screen-display of profile or
dpi settings or requests for execution of macro sequences that are not stored
in device. The information in these events depends on hid device implementation
and contains data that is not available in a single hid event or else hidraw
could have been used.
It is inspired by hidraw, but uses only one circular buffer for all readers.
The device is as generic as possible so that the functionality is usable by all
(kone and upcomming) roccat device drivers.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This change adds in the USB product ID for the Gyration
GYR4101US USB media center remote control. This remote
is similar enough to the other two devices that this driver
can be used without any other changes to get full support
for the remote.
Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
After merging the driver-core tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:
drivers/hid/hid-roccat-kone.c:694: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:696: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:701: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:703: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:708: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:710: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:715: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:717: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:722: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:724: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:729: warning: initialization from incompatible pointer type
drivers/hid/hid-roccat-kone.c:731: warning: initialization from incompatible pointer type
Introduced by commit 867040163f10f2b52b45bc573f330d6eb28f5914 ("sysfs:
add struct file* to bin_attr callbacks") from the driver-core tree
interacting with commit 14bf62cde7 ("HID:
add driver for Roccat Kone gaming mouse") from the hid tree.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The whole point of making some of the drivers automatically selected
unless 'EMBEDDED' was to handle quirks transparently after their separation
from the generic core.
Over time, some of the later-added quirks grew into more standalone drivers,
implementing non-trivial features a being larger than a few bytes of code.
In addition to that, some of the standalone drivers don't make sense for
99.9% of the users, as they are very specific to rare devices.
Therefore build by default in only those drivers which
- we historically used to support even before quirk separation from the
core code
- are isolated enough and likely to hit quite large portion of the
users anyway (Microsoft, Logitech)
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
All call sites have been changed accordingly, except for staging
drivers.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1350) removes all usages of coherent buffers for USB
control-request setup-packet buffers. There's no good reason to
reserve coherent memory for these things; control requests are hardly
ever used in large quantity (the major exception is firmware
transfers, and they aren't time-critical). Furthermore, only seven
drivers used it. We might as well always use streaming DMA mappings
for setup-packet buffers, and remove some extra complexity from
usbcore.
The DMA-mapping portion of hcd.c is currently in flux. A separate
patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP
after everything else settles down. The removal should go smoothly,
as by then nobody will be using it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Removed useless preprocessor macros and renamed remaining one to be
more qualified.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
As special events are reported along with hid event information all
events are now processed further by standard handler.
Also cleaned up this code.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Added new data and changed workaround for abnormal button behaviour
according to new gained knowledge about Roccat Kone device.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Added the __init and __exit hints for module functions.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This patch makes the hidraw driver use the first Interrupt OUT endpoint for
HID transfers to the device if such an endpoint exists. This is consistent
with the behavior of the hiddev driver, and the logic is similar.
From the USB HID specification:
The Interrupt Out pipe is optional. If a device declares an Interrupt Out
endpoint then Output reports are transmitted by the host to the device
through the Interrupt Out endpoint. If no Interrupt Out endpoint is
declared then Output reports are transmitted to a device through the
Control endpoint, using Set_Report(Output) requests.
Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Remove 7 redundant key mappings from Desktop Wireless 6000 that are
already handled by the default hid code.
Reported-by: Robert Schedel <r.schedel@yahoo.de>
Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Commit a9885c8f7b ("HID: Zydacron Remote Control driver") added
hid-zydracon driver by Don Prince, but mistakenly omitted hid-zydracon.c
file itself. Properly add the file.
Reported-by: Don Prince <dhprince.devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add support for the multimedia buttons of the Creative Desktop Wireless 6000
keyboard/mouse combo which are not currently handled by the default/samsung HID
driver.
Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The skip label frees resp, which has not been allocated at the point of
this goto and then does a break, based on the fact that err is non-zero.
This is replaced by a break directly.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@free@
expression E;
position p;
@@
kfree@p(E)
@@
expression free.E, subE<=free.E, E1;
position free.p;
@@
kfree@p(E)
...
(
subE = E1
|
* E
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
A specialised HID driver for the Zydacron Remote Control (usb id: 13ec:0006).
The specialised HID driver adds support for the buttons which are not
currently handled by the default HID driver.
Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Use kmemdup when some other buffer is immediately copied into the
allocated region.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression from,to,size,flag;
statement S;
@@
- to = \(kmalloc\|kzalloc\)(size,flag);
+ to = kmemdup(from,size,flag);
if (to==NULL || ...) S
- memcpy(to, from, size);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
When HIDRAW is not set, hid_hw_start() returns ENODEV as no subsystem has
claimed the magicmouse device, and probe routine bails out. Which is not what we want.
This happens because magicmouse driver is instantiating the connection to
Input subsystem itself, and since commit 28918c211d ("HID: magicmouse: fix
oops after device removal") the HID core is not registering input device
itself.
Fix this by letting HID core register the input device (so that hid_hw_start()
succeeds, as the device is claimed by at least one subsystem) and de-register
it again later before proceeding with proper input setup.
Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
A specialised HID driver for the Creative Prodikeys PC-MIDI USB Keyboard.
The Prodikeys PC-MIDI is a multifunction keyboard comprising a qwerty keyboard,
multimedia keys and a touch sensitive musical keyboard.
The specialised HID driver adds full support for the musical keyboard and extra
multimedia keys which are not currently handled by the default HID driver.
The specialised HID driver interfaces with ALSA, and presents the midi keyboard
as a rawmidi device. Sustain duration, octave shifting and the midi output
channel can be read/written form userspace via sysfs.
Signed-off-by: Don Prince <dhprince-devel@yahoo.co.uk>
ALSA parts:
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This should make it a little more convenient to tweak the filtering
parameters on the fly. Also unlike load-time parameters, this provides
independent tuning for each device conntected.
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The old rejection size thresholds were too high for the 12" devices.
Larger surfaces like the Dell Studio17 exacerbated the problem since
contact size is reported on the same logical scale, making a contact
look smaller to the larger screen.
Since we have observed erroneous ghost events from these devices we
still need to filter the incoming stream.
The prior size threshold filter is still in place, though with
defaults set to leave it off.
This patch adds the two new classes of filters, those that reject
live frames before activation, and those that reject empty frames
until deactivation. These filters are expressed in terms of a
simple state machine for clarity (I hope).
The activation filter has two components, slack and size, events
are discarded until either is satisfied. Slack is defined as
the number of seemingly good contacts to read before accepting the
stream as valid (if the threshold is reached in the middle of a frame
the remainder of that frame is still discarded).
The deactivation filter discards empty frames until hitting a
deactivate slack. This time measured in frames. N-Trig devices
emit 5-8 (observed so far) empty frames at the end of multitouch
activity. Ignoring the first few enables us to safely and gracefully
handle erroneous empty frames, thus preventing a change in the tool
state which would otherwise result in things like broken lines or
dragged objects being dropped in bad places.
Also, now that devices with different logical densities have
been observed, the aforementioned sizes are scaled from physical
to logical scales once those scales are identified. Hopefully this
should mean that a given threshold value means the same thing across
differing devices.
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
I've got one of these devices on my desk and it seems that it suffers from
the ABS_Z/ABS_RX issue that we've seen in other devices before. This patch
uses the same reasoning as 9db630b48 ("HID: add multi-input quirk for NextWindow
Touchscreen").
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Although the usbhid driver allocates its usbhid structure in the probe
routine, several critical fields in that structure don't get
initialized until usbhid_start(). However if report descriptor
parsing fails then usbhid_start() is never called. This leads to
problems during system suspend -- the system will freeze.
This patch (as1378) fixes the bug by moving the initialization
statements up into usbhid_probe().
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Tested-By: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Don't send the report type as part of the data, this prevents the
controller from going into the operational state at all.
This is completely equivalent to what the code originally meant to accomplish:
as per in net/bluetooth/hidp/core.c::hidp_output_raw_report(), by using
HID_FEATURE_REPORT here, what will be actually sent is
(HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE) which is exactly 0x53.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add PM support in order to turn off backlight on suspend, restore
it on resume and especially restore complete state on reset-resume.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Removing the higher number taps. Their usage was incorrect
and even if correct they should not be used for a touch screen.
_MT_ events should be used to communicate multiple fingers.
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Include TipSwitch in the touch detection decision for some single touch
firmwares. Confidence and InRange are high for all finger events
including those used to indicate the finger is no longer in contact with
the sensor.
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The Behavior Tech. Computer Corp. (BTC) remote branded as "Emprex 3009URF III
Vista Remote Controller" uses non-standard mappings for all of its 'special
purpose' keys (0xffbc usage page). This patch modifies the existing
hid-topseed quirky driver to support both remotes in order to prevent
proliferation of in-kernel quirky drivers until such a time that udev remapping
works with these devices. Tested successfully with both the "Emprex" remote
and the "CyberLink" remote originally supported by the hid-topseed driver.
Signed-off-by: Wayne Thomas <waynethomas69@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Original operation_mode sysfs attribute accepts the operation mode
as main value with an option delay as second value to change
the start-up delay on mode change.
As it is preferred to have exactly one value per sysfs attribute,
extract this delay into a separate sysfs attribute called
operation_mode_delay.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add suspend/resume hooks for HID drivers so these can do some
additional state adjustment when device gets suspended/resumed.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Make hidraw not stick an extra byte on the beginning of an IN transfer
when a HID device contains multiple reports.
Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
During grouping of version checking code bootloader mode's version
bytes got swapped. Fix their order.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Fix build failure introduced by 4afb032068 ("HID: fix
support for Wacom Intuos 4 wireless") due to missing coma.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Added support for the 11.6" Cando panel found on the Acer Timeline 1825PTZ.
Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Johannes Klug <johannesklug@room2web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This is the only line printed on my "quiet" boot and seems completely
unnecessary.
Signed-off-by: Cory Fields <FOSS@AtlasTechnologiesInc.com>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Commit ed9eac5b49 ("HID: add support for the Wacom Intuos 4 wireles")
forgot to add VID/PID to hid_blacklist[]. Fix that up.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The keys are added to the generic wireless mappings in case other
keyboards use them. Note that the product ID for the MX3200 is the same
as USB_DEVICE_ID_S510_RECEIVER_2.
Signed-off-by: Lorenzo Castelli <lcastelli@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
With flags non initialized, the single touch emulation has an erratic
behavior. Fixed this.
Signed-off-by: Stephane Chatty <chatty@lii-enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add two quirks to make it possible for usbhid module options to
override whether a device is ignored (HID_QUIRK_NO_IGNORE) and
whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE).
Passing HID_QUIRK_NO_IGNORE for your device means that it will
not be ignored by the HID layer, even if present in a blacklist.
HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that
device, making it accessible from user-space.
Tested with an Apple IR Receiver, switching it from using appleir
to using lirc's macmini driver.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Added support for the Cando dual touch panels, found in the Lenovo S10-3t.
Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Priya Vijayan <priya.vijayan@intel.com>
Tested-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
From my review of the way the unused bits of report are being zeroed,
it seems like there must be a bug. Currently, the zeroing is done
in hid_output_field and it covers any bits between the last used bit
and the end of the byte. But in case of, say, my keyboard, NumLock is
mask 0x01 and CapsLock is 0x02. Invoking hid_output_field for NumLock
definitely zeroes across CapsLock. The only reason this works is that
the fields are sorted by the offset.
It would be more correct and simpler to zero-fill the buffer into
which the fields are set.
The patch is tested with an IBM keyboard that is improperly sensitive
to out-of-report pad bits, the extra bits are still zeroed and the
fields continue to work as expected. It is also tested with good
keyboards.
In case, a related bug in RHEL 5 is tracked with Red Hat bug 513934.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
I squelched TipSwitch in a recent patch which resulted in the loss
of Touch events for single touch firmwares. This patch just puts Touch back
in for single touch, and bundles it with DoubleTap (like the multitouch code).
The two events are used to convey the same message to different drivers.
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Now support the 22" display and its updated firmware, including touch
width and height.
The number of touches can now go up to 60, and our single touch emulation
will fail when there are more than 6-7 touches; further work is needed on
this.
Signed-off-by: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
HID_PICOLCD should depend on LCD_CLASS_DEVICE, otherwise the
build fails when HID_PICOLCD=y and LCD_CLASS_DEVICE=m:
hid-picolcd.c:(.text+0x84523f): undefined reference to `lcd_device_unregister'
hid-picolcd.c:(.text+0x8478ab): undefined reference to `lcd_device_register'
hid-picolcd.c:(.text+0x84c15f): undefined reference to `lcd_device_unregister'
Same applies to FB, BACKLIGHT_CLASS_DEVICE and LEDS_CLASS.
Add suboptions for those features to handle the deps on kbuild side
and just check HID_PICOLCD_* in the code.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Added support for the eGalax dual-touch panel, found on the Asus EeePC T101MT
Signed-off-by: Stephane Chatty <chatty@enac.fr>
Tested-by: Philipp Merkel <linux@philmerk.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Support the solar version of the Cherry's cymotion keyboard line using
existing cherry driver.
Signed-off-by: Raphaël Doursenaud <rdoursenaud@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Commit 6549981bc5 ("HID: fix N-trig touch panel with recent firmware")
adds a quirk that is needed for devices with more recent firmware so that
they become operational.
As it's not directly obvious from the code why is it needed, a comment
is worthwile.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This patch (as1365) enables remote wakeup by default for USB keyboard
devices. Keyboards in general are supposed to be wakeup devices, but
the correct place to enable it depends on the device's bus; no single
approach will work for all keyboard devices. In particular, this
covers only USB keyboards (and then only those supporting the boot
protocol).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Using copy_{to,from}_user requires the include of linux/uaccess.h.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The PicoLCD device has a small amount of EEPROM and also provides access
to its FLASH where firmware and splash image are saved.
In flasher mode FLASH access is the only active feature.
Give read/write access to both via debugfs files.
NOTE: EEPROM and FLASH access should be switched to better suited API,
until then the will reside in debugfs
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add leds support to PicoLCD device to drive the GPO pins.
GPO support depends on leds class and is only being
compiled if leds class has been selected.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add lcd support to PicoLCD device.
LCD support depends on lcd class and is only being
compiled if lcd class has been selected.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add backlight support to PicoLCD device.
Backlight support depends on backlight class and is only being
compiled if backlight class has been selected.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add framebuffer support to PicoLCD device with use of deferred-io.
Only changed areas of framebuffer get sent to device in order to
save USB bandwidth and especially resources on PicoLCD device or
allow higher refresh rate for a small area. Changed tiles are
determined while updating shadow framebuffer.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Add basic driver for PicoLCD graphics device.
Initially support keypad with input device and provide support
for debugging communication via events file from debugfs.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Implicit slab.h inclusion via percpu.h is about to go away. Make sure
gfp.h or slab.h is included as necessary.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
We don't need to shout loudly when device gets disconnected
while hidraw node has been open, as this is properly handled
in disconnect() and protected by minors_lock already.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Remove BKL from hidraw, which is possible through fixing the
locking of minors_lock mutex properly -- it is now used to
guard all accessess to hidraw_table[], preventing it to becoming
NULL unexpectedly by unregistering the device.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Fix oops caused by dereferencing field->hidinput in cases where
the device hasn't been claimed by hid-input.
Reported-by: Andreas Demmer <mail@andreas-demmer.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Make it independent on CONFIG_EMBEDDED (to be in sync with other
"full-fledged" HID drivers which are not simple quirks) and provide
a little bit better text description.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This Patch adds support for Kone gaming mouse from Roccat.
It provides access to profiles, settings, firmware, weight,
actual settings etc. through sysfs attributes.
Event handling of this mouse differs from standard hid behaviour
in that tilt button press is reported in each move event which
results in strange behaviour if not handled by the driver.
This is a heavily reworked version of the previously introduced driver.
The changes include most of the previously raised concerns,
memory leak and other fixes, code cleanups, adoption of additional
achieved knowlege about the hardware and is (IMHO) a much better version
than before even when I exchanged reduced USB-IO with a bigger memory
consumption.
I refused to implement one mentioned point:
Removing the 'just-because-we-can' attributes. Motivation:
Reading the clipped in weight: I'm no gamer and can't determine the
usefulness of this feature but if the manufacturer implements such a
feature it might make sense to someone and I would unwillingly limit the
functionality besides its such a small feature.
Reading the actual profile and dpi settings: Here I can testify that one
can get lost of the actual settings when switching back and forth.
The manufacturers windows driver has the ability for on-screen-display
of the values and there is a mouse in the market that has an lcd on the
underside of it to show these values. So I think this feature makes sense
not only for me and shouldn't be removed.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The attribute allows to change reporting speed of tablet from userspace through
sysfs file. The attribute is RW, valid values: 0 is low speed, 1 is high speed.
High speed is the default setting. Using low speed is a workaround if you
experience lag when using the tablet.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
wacom_poke function allows to switch tablet reporting speed. The patch
dosen't add any new functionality, but it's preparation for user-space
speed switching through sysfs.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
The handling of failed debugging buffer allocation got overly
complicated. We simply want to skip the debugging code if allocation
fails and go on with event processing.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
if hid_get_report() fails for whatever reason, the raw output of
the report doesn't make it into 'events' file in debugfs at all, because
we leave hid_input_report() too soon.
We want the report to be always present for debugging reasons. Move the
code around, so that the event makes it to 'events' file all the time,
even if we are going to discard the report.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
When dumping /sys/kernel/debug/hid/$device/events '\0' characters show up
(invisible if cat to console but shown by less or while looking at a dump
file). These are due to hid_debug_event() adding strlen()+1 bytes to the ring
buffer (e.g. including the trailing '\0'). Any roll-over causes a '\0' as well
as hid_debug_event() handles the ring buffers with HID_DEBUG_BUFSIZE-1 size
while hid_debug_events_read() handles it with full HID_DEBUG_BUFSIZE size.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>