Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/jikos/hid

Pull HID updates from Jiri Kosina:

 1) Patchset from Henrik Rydberg which substantially reduces irqsoff
    latency for all input devices.  In addition to that, Henrik reworked
    multitouch handling in order to reduce runtime memory consumption.

    This patchset touches code in Input subsystem as well.  All the
    changes have been Acked by Dmitry, and we agreed to do it this way
    due to inter-dependencies between the patchset and subsequent
    changes in HID subsystem.

 2) Rework, clenaups and a lot of fixes to picolcd driver by Bruno
    Prémont.

 3) Core report descriptor handling fix which fixes resume issue on some
    devices, by Kevin Daughtridge

 4) hidraw fixes by Alexey Khoroshilov and Ratan Nalumasu

 5) wiimote driver now supports balance board, by David Herrmann.

 6) Other smaller fixes and new device id additions all over the place.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (79 commits)
  HID: hidraw: don't deallocate memory when it is in use
  HID: picoLCD: optimize for inactive debugfs
  HID: multitouch: add support for GeneralTouch multi-touchscreen
  HID: Add support for Sony PS3 BD Remote Control
  HID: keep dev_rdesc unmodified and use it for comparisons
  HID: lg4ff: Minor coding style fixes in lg4ff and hid-lg
  HID: hid-lg4ff: Set absolute axes parametes on DFP
  HID: hid-lg4ff: Adjust X axis input value accordingly to selected range.
  HID: hid-lg4ff: Minor code cleanup to improve readability
  HID: ntrig: change default value of logical/physical width/height to 1
  HID: picoLCD: bounds check in dump_buff_as_hex()
  Input: bcm5974 - Convert to MT-B
  Input: bcm5974 - Drop the logical dimensions
  Input: bcm5974 - Preparatory renames
  Input: bcm5974 - only setup button urb for TYPE1 devices
  HID: hid-multitouch: Add Flatfrog support
  HID: hid-multitouch: Fix contact count on 3M panels
  HID: hid-multitouch: Remove the redundant touch state
  HID: hid-multitouch: Simplify setup and frame synchronization
  HID: Allow more fields in the hid report
  ...
  • Loading branch information
torvalds committed Oct 1, 2012
2 parents 99dbb16 + cdcd3ac commit 9fa40a1
Show file tree
Hide file tree
Showing 71 changed files with 4,900 additions and 3,568 deletions.
13 changes: 13 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-wacom
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
WWhat: /sys/class/hidraw/hidraw*/device/oled*_img
Date: June 2012
Contact: [email protected]
Description:
The /sys/class/hidraw/hidraw*/device/oled*_img files control
OLED mocro displays on Intuos4 Wireless tablet. Accepted image
has to contain 256 bytes (64x32 px 1 bit colour). The format
is the same as PBM image 62x32px without header (64 bits per
horizontal line, 32 lines). An example of setting OLED No. 0:
dd bs=256 count=1 if=img_file of=[path to oled0_img]/oled0_img
The attribute is read only and no local copy of the image is
stored.

What: /sys/class/hidraw/hidraw*/device/speed
Date: April 2010
Kernel Version: 2.6.35
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5322,6 +5322,12 @@ L: [email protected]
S: Maintained
F: drivers/mtd/devices/phram.c

PICOLCD HID DRIVER
M: Bruno Prémont <[email protected]>
L: [email protected]
S: Maintained
F: drivers/hid/hid-picolcd*

PICOXCELL SUPPORT
M: Jamie Iles <[email protected]>
L: [email protected] (moderated for non-subscribers)
Expand Down
22 changes: 20 additions & 2 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ config HID_LOGITECH
config HID_LOGITECH_DJ
tristate "Logitech Unifying receivers full support"
depends on HID_LOGITECH
default m
---help---
Say Y if you want support for Logitech Unifying receivers and devices.
Unifying receivers are capable of pairing up to 6 Logitech compliant
Expand Down Expand Up @@ -527,13 +526,30 @@ config HID_PICOLCD_LEDS
---help---
Provide access to PicoLCD's GPO pins via leds class.

config HID_PICOLCD_CIR
bool "CIR via RC class" if EXPERT
default !EXPERT
depends on HID_PICOLCD
depends on HID_PICOLCD=RC_CORE || RC_CORE=y
---help---
Provide access to PicoLCD's CIR interface via remote control (LIRC).

config HID_PRIMAX
tristate "Primax non-fully HID-compliant devices"
depends on USB_HID
---help---
Support for Primax devices that are not fully compliant with the
HID standard.

config HID_PS3REMOTE
tristate "Sony PS3 BD Remote Control"
depends on BT_HIDP
---help---
Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
Harmony Adapter for PS3, which connect over Bluetooth.

Support for the 6-axis controllers is provided by HID_SONY.

config HID_ROCCAT
tristate "Roccat device support"
depends on USB_HID
Expand Down Expand Up @@ -561,7 +577,9 @@ config HID_SONY
tristate "Sony PS3 controller"
depends on USB_HID
---help---
Support for Sony PS3 controller.
Support for Sony PS3 6-axis controllers.

Support for the Sony PS3 BD Remote is provided by HID_PS3REMOTE.

config HID_SPEEDLINK
tristate "Speedlink VAD Cezanne mouse support"
Expand Down
21 changes: 21 additions & 0 deletions drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,28 @@ obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
hid-picolcd-y += hid-picolcd_core.o
ifdef CONFIG_HID_PICOLCD_FB
hid-picolcd-y += hid-picolcd_fb.o
endif
ifdef CONFIG_HID_PICOLCD_BACKLIGHT
hid-picolcd-y += hid-picolcd_backlight.o
endif
ifdef CONFIG_HID_PICOLCD_LCD
hid-picolcd-y += hid-picolcd_lcd.o
endif
ifdef CONFIG_HID_PICOLCD_LEDS
hid-picolcd-y += hid-picolcd_leds.o
endif
ifdef CONFIG_HID_PICOLCD_CIR
hid-picolcd-y += hid-picolcd_cir.o
endif
ifdef CONFIG_DEBUG_FS
hid-picolcd-y += hid-picolcd_debugfs.o
endif

obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
obj-$(CONFIG_HID_PS3REMOTE) += hid-ps3remote.o
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
hid-roccat-koneplus.o hid-roccat-kovaplus.o hid-roccat-pyra.o \
Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-a4tech.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/

Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby <[email protected]>
*/

Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-aureal.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/
#include <linux/device.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-belkin.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/

Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-cherry.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/

Expand Down
38 changes: 30 additions & 8 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ static int open_collection(struct hid_parser *parser, unsigned type)

if (parser->collection_stack_ptr == HID_COLLECTION_STACK_SIZE) {
hid_err(parser->device, "collection stack overflow\n");
return -1;
return -EINVAL;
}

if (parser->device->maxcollection == parser->device->collection_size) {
collection = kmalloc(sizeof(struct hid_collection) *
parser->device->collection_size * 2, GFP_KERNEL);
if (collection == NULL) {
hid_err(parser->device, "failed to reallocate collection array\n");
return -1;
return -ENOMEM;
}
memcpy(collection, parser->device->collection,
sizeof(struct hid_collection) *
Expand Down Expand Up @@ -170,7 +170,7 @@ static int close_collection(struct hid_parser *parser)
{
if (!parser->collection_stack_ptr) {
hid_err(parser->device, "collection stack underflow\n");
return -1;
return -EINVAL;
}
parser->collection_stack_ptr--;
return 0;
Expand Down Expand Up @@ -374,7 +374,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)

case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
parser->global.report_size = item_udata(item);
if (parser->global.report_size > 96) {
if (parser->global.report_size > 128) {
hid_err(parser->device, "invalid report_size %d\n",
parser->global.report_size);
return -1;
Expand Down Expand Up @@ -757,6 +757,7 @@ int hid_open_report(struct hid_device *device)
struct hid_item item;
unsigned int size;
__u8 *start;
__u8 *buf;
__u8 *end;
int ret;
static int (*dispatch_type[])(struct hid_parser *parser,
Expand All @@ -775,12 +776,21 @@ int hid_open_report(struct hid_device *device)
return -ENODEV;
size = device->dev_rsize;

buf = kmemdup(start, size, GFP_KERNEL);
if (buf == NULL)
return -ENOMEM;

if (device->driver->report_fixup)
start = device->driver->report_fixup(device, start, &size);
start = device->driver->report_fixup(device, buf, &size);
else
start = buf;

device->rdesc = kmemdup(start, size, GFP_KERNEL);
if (device->rdesc == NULL)
start = kmemdup(start, size, GFP_KERNEL);
kfree(buf);
if (start == NULL)
return -ENOMEM;

device->rdesc = start;
device->rsize = size;

parser = vzalloc(sizeof(struct hid_parser));
Expand Down Expand Up @@ -1448,7 +1458,14 @@ void hid_disconnect(struct hid_device *hdev)
}
EXPORT_SYMBOL_GPL(hid_disconnect);

/* a list of devices for which there is a specialized driver on HID bus */
/*
* A list of devices for which there is a specialized driver on HID bus.
*
* Please note that for multitouch devices (driven by hid-multitouch driver),
* there is a proper autodetection and autoloading in place (based on presence
* of HID_DG_CONTACTID), so those devices don't need to be added to this list,
* as we are doing the right thing in hid_scan_usage().
*/
static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
Expand Down Expand Up @@ -1566,6 +1583,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_DESKTOP) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_MINI) },
Expand Down Expand Up @@ -1627,6 +1645,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
#if IS_ENABLED(CONFIG_HID_ROCCAT)
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) },
Expand All @@ -1635,10 +1654,12 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_SAVU) },
#endif
{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
Expand All @@ -1663,6 +1684,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) },
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP1062) },
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850) },
{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60) },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) },
Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-cypress.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/

Expand Down
12 changes: 9 additions & 3 deletions drivers/hid/hid-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,15 +911,21 @@ static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)

}


static int hid_debug_rdesc_show(struct seq_file *f, void *p)
{
struct hid_device *hdev = f->private;
const __u8 *rdesc = hdev->rdesc;
unsigned rsize = hdev->rsize;
int i;

if (!rdesc) {
rdesc = hdev->dev_rdesc;
rsize = hdev->dev_rsize;
}

/* dump HID report descriptor */
for (i = 0; i < hdev->rsize; i++)
seq_printf(f, "%02x ", hdev->rdesc[i]);
for (i = 0; i < rsize; i++)
seq_printf(f, "%02x ", rdesc[i]);
seq_printf(f, "\n\n");

/* dump parsed data and input mappings */
Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-ezkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2006-2007 Jiri Kosina
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
*/

Expand Down
1 change: 0 additions & 1 deletion drivers/hid/hid-gyration.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Copyright (c) 1999 Andreas Gal
* Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
* Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
* Copyright (c) 2007 Paul Walmsley
* Copyright (c) 2008 Jiri Slaby
* Copyright (c) 2006-2008 Jiri Kosina
*/
Expand Down
3 changes: 1 addition & 2 deletions drivers/hid/hid-holtekff.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ static void holtekff_send(struct holtekff_device *holtekff,
holtekff->field->value[i] = data[i];
}

dbg_hid("sending %02x %02x %02x %02x %02x %02x %02x\n", data[0],
data[1], data[2], data[3], data[4], data[5], data[6]);
dbg_hid("sending %*ph\n", 7, data);

usbhid_submit_report(hid, holtekff->field->report, USB_DIR_OUT);
}
Expand Down
Loading

0 comments on commit 9fa40a1

Please sign in to comment.