Commit Graph
18 Commits
Author SHA1 Message Date
Anssi Hannula 20eb127906 hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
Add a force feedback driver for PantherLord USB/PS2 2in1 Adapter,
0810:0001. The device identifies itself as "Twin USB Joystick".

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2007-02-05 10:00:05 +01:00
Anssi Hannula 5556feae1c hid: quirk for multi-input devices with unneeded output reports
Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports
when enumerating reports on a hid-input device. Add this quirk and
HID_QUIRK_MULTI_INPUT to 0810:0001.

PantherLord Twin USB Joystick, 0810:0001 has separate input reports
for 2 distinct game controllers in the same interface, so it needs
HID_QUIRK_MULTI_INPUT. However, the device also contains one output
report per controller which is used to control the force feedback
function, and we do not want those to appear as separate input
devices as well. The simplest approach seems to be to add a quirk to
skip output reports on 0810:0001, and allow the force feedback
driver to handle those.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2007-02-05 10:00:04 +01:00
Anssi Hannula c4146067fd hid: allow force feedback for multi-input devices
Allow hid devices with HID_QUIRK_MULTI_INPUT to have force feedback.
This was previously disabled because there were not any force
feedback drivers for such devices. This will change with my upcoming
patch.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2007-02-05 10:00:02 +01:00
Anssi Hannula be8209753b HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage
The commit 4916b3a57f introduced a
hid regression between 2.6.19 and 2.6.20-rc1. The device put in
input_dev->cdev is now of type usb_device instead of usb_interface.

Before:
> # readlink -f /sys/class/input/input6/event4/device
> /sys/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.1
After:
> # readlink -f /sys/class/input/input3/event3/device
> /sys/devices/pci0000:00/0000:00:10.0/usb1/1-1

This causes breakage:
> # udevinfo -q all -n /dev/input/event3
> P: /class/input/input3/event3
> N: input/event3
> S: input/by-path/pci-1-1--event-
> E: ID_SERIAL=noserial
> E: ID_PATH=pci-1-1-

No ID_MODEL, ID_VENDOR, ID_REVISION, ID_TYPE etc etc.

Fix this by assigning the intf->dev into hid->dev, and fixing
all the users.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2007-01-21 22:18:01 +01:00
Anssi Hannula 41ad5fbabd Input: HID - add a quirk for the Logitech USB Receiver
Logitech USB Receiver (046d:c101) has two interfaces. The first one
contains fields from HID_UP_KEYBOARD and HID_UP_LED, and the other one
contains fields from HID_UP_CONSUMER and HID_UP_LOGIVENDOR. This device
is used with multiple wireless Logitech products, including UltraX Media
Remote.

All fields on both interfaces are either keys or leds. All fields in the
first interface are marked as Absolute, while the fields in the second
interface are marked as Relative. Marking the keys as relative causes
hidinput_hid_event() to send release events right after key press
events.

The device has EV_REP set, so the userspace expects the device to send
repeat events if a key is held down. However, as hidinput_hid_event()
sends release events immediately, repeat events are not sent at all. In
fact, the userspace has no way of knowing if a key is being held down.

Fix this by adding a quirk for 046d:c101 which changes relative keys to
absolute ones.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-11-04 22:49:53 -05:00
Anssi Hannula 8b8277a174 Input: update the force feedback documentation
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:44:22 -04:00
Anssi Hannula bb3caf7f43 Input: add force feedback driver for PSX-style Zeroplus devices
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:44:17 -04:00
Anssi Hannula 1f734cb461 Input: drop remnants of the old force-feedback interface
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:44:08 -04:00
Anssi Hannula ff46255123 Input: uinput - switch to the new FF interface
The userspace interface of the force feedback part is changed and
documentation in uinput.h is updated accordingly. MODULE_VERSION
is also incremented to reflect the revision.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:41:09 -04:00
Anssi Hannula dc76c91214 Input: use new FF interface in the HID force feedback drivers
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:55 -04:00
Anssi Hannula 224ee88fe3 Input: add force feedback driver for PID devices
This replaces the older PID driver which was never completed.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:47 -04:00
Anssi Hannula f6a01c8596 Input: iforce - switch to the new FF interface
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:39 -04:00
Anssi Hannula 7d928a2b14 Input: unified force feedback support for memoryless devices
Consolidate core implementing memoryless devices in one module; added
support for gain and envelopes and periodic => rumble conversion.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:30 -04:00
Anssi Hannula 509ca1a938 Input: implement new force feedback interface
Implement a new force feedback interface, in which all non-driver-specific
operations are separated to a common module. This includes handling effect
type validations, locking, etc.

The effects are now file descriptor specific instead of the previous strange
half-process half-fd specific behaviour. The effect memory of devices is not
emptied if the root user opens and closes the device while another user is
using effects. This is a minor change and most likely no force feedback
aware programs are affected by this negatively.

Otherwise the userspace interface is left unaltered.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:22 -04:00
Anssi Hannula 806d41b756 Input: move fixp-arith.h to drivers/input
Move fixp-arith.h from drivers/usb/input to drivers/input, as the part of
force feedback support that requires trigonometric functions is being moved
there.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-07-19 01:40:14 -04:00
Anssi Hannula 3cbd5b32cb Input: fix accuracy of fixp-arith.h
Add the value of cos(90) = 0 to the table.  This also moves the results so
that sin(x) == sin(180-x) is true as expected.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-06-05 00:18:43 -04:00
Anssi Hannula fe65b97a58 Input: iforce - use ENOSPC instead of ENOMEM
Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have
enough free memory for the new effect.  All other drivers are using
-ENOSPC, so this makes the behaviour coherent.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2006-06-05 00:18:21 -04:00
Anssi Hannula 0c744b0100 [PATCH] dvb: add missing release_firmware() calls
Add missing release_firmware() calls to fix memory leaks.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Johannes Stezenbach <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2005-07-07 18:23:54 -07:00