05 Jul, 2013

1 commit

  • Pull input updates from Dmitry Torokhov:
    "First round of updates for the input subsystem.

    You will get a new touchsreen driver for Cypress 4th generation
    devices, a driver for a special controller implementing PS/2 protocol
    in OLPC devices, and a driver for power key for SiRFprimaII PWRC.

    HID and bcm5497 now support for the 2013 MacBook Air.

    EVIOCGKEY and the rest of evdev ioctls now flush events of matching
    type from the client's event queue so that clients can be sure any
    events received after issuing EVIOCG* ioctl are new events.

    And a host of cleanups and improvements in other drivers"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits)
    Input: cyttsp4 - kfree xfer_buf on error path in probe()
    Input: tps6507x-ts - select INPUT_POLLDEV
    Input: bcm5974 - add support for the 2013 MacBook Air
    HID: apple: Add support for the 2013 Macbook Air
    Input: cyttsp4 - leak on error path in probe()
    Input: cyttsp4 - silence NULL dereference warning
    Input: cyttsp4 - silence shift wrap warning
    Input: tps6507x-ts - convert to polled input device infrastructure
    ARM: davinci: da850-evm: remove vref from touchscreen platform data
    Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices
    Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devices
    Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices
    Input: cyttsp - I2C driver split into two modules
    Input: add OLPC AP-SP driver
    Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe()
    Input: tps6507x-ts - remove vref from platform data
    Input: tps6507x-ts - use bool for booleans
    Input: tps6507x-ts - remove bogus unreachable code
    Input: samsung-keypad - let device core setup the default pin configuration
    Input: wacom_i2c - implement hovering capability
    ...

    Linus Torvalds
     

04 Jul, 2013

3 commits


03 Jul, 2013

1 commit

  • This patch adds keyboard support for MacbookAir6,2 as WELLSPRING8
    (0x0291, 0x0292, 0x0293). The touchpad is handled in a separate
    bcm5974 patch, as usual.

    Cc: stable@vger.kernel.org
    Reported-and-tested-by: Brad Ford
    Signed-off-by: Henrik Rydberg
    Signed-off-by: Jiri Kosina
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

03 Jun, 2013

1 commit

  • hdrw->raw event can return three different return value types:

    - ret < 0 indicates that the hdrv driver found an error while parsing
    - ret == 0 indicates no error has been encountered, and the driver has
    processed the report
    - ret > 0 indicates that there was no parsing error, and the driver hasn't
    processed the event.

    Calling hid_report_raw_event() has to be called appropriately so that it
    reflects what has been done by ->raw_event() callback, otherwise we might
    updates of the in-kernel structure are lost upon arrival of the report, which
    is wrong.

    Reported-and-tested-by: Srinivas Pandruvada
    Reported-and-tested-by: Daniel Leung
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

29 May, 2013

1 commit

  • This is a driver for ELO 4000/4500 devices which report themselves as
    HID devices, but do not really send HID events on touch. So we
    introduce a new HID 'quirk' driver with a raw_event handler where we
    take care of those events.

    What we need additionally is an input_configured hook, because the
    device does not mention anything about PRESSURE and TOUCH in its
    report descriptor, but it actually generate those. So we set the bits
    in the corresponding input_dev in that hook.

    Thanks to Petr Ostadal who was willing to test the driver. The rest of
    Cc's listed below had something to do with that driver over the years
    in our enterprise tree.

    Signed-off-by: Jiri Slaby
    Tested-by: Petr Ostadal
    Cc: Oliver Neukum
    Cc: Vojtech Pavlik
    Cc: Egbert Eich
    Cc: Libor Pechacek
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     

28 May, 2013

3 commits

  • Add hid-huion.c with support for Huion 580 tablet, which is simple
    8x5" tablet with 4000LPI resolution and 2048 levels pressure-sensitive
    pen manufactured by the Chinese company Huion.

    The driver fixes incorrect report descriptor sent by the device,
    performs custom initialization required to switch the tablet into
    its native resolution mode and inverts the in-range bit.

    Signed-off-by: Martin Rusko
    Signed-off-by: Jiri Kosina

    Martin Rusko
     
  • Add device IDs of devices driven by hid-holtek-mouse to
    hid_have_special_driver[].

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • This patch adds support for PS2/3 Buzz controllers into hid-sony

    It has been tested on Debian 7 with kernel version 3.10.0-rc2. Unfortunately
    I can't test the patch with a regular six-axis controller myself.

    Signed-off-by: Colin Leitner
    Cc: Jiri Kosina
    Cc: linux-input@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Jiri Kosina

    Colin Leitner
     

23 May, 2013

1 commit

  • Add a quirk to ignore Jabra speakerphone 410 and 510 devices HID
    interface.
    On those devices, the USB audio interface is working nicely,
    but the HID interface is not working with the kernel usbhid driver,
    and it requires a specific userspace program.
    We could unbind it from userspace but just attaching the usbhid driver has
    sometimes nasty effects:
    either confusing the device state machine or triggering a storm of volume key
    events making eventual sound UI blinking like crazy.

    Signed-off-by: Vincent Palatin
    Signed-off-by: Jiri Kosina

    Vincent Palatin
     

06 May, 2013

1 commit

  • Commit 2353f2bea ("HID: protect hid_debug_list") introduced mutex
    locking around debug_list access to prevent SMP races when debugfs
    nodes are being operated upon by multiple userspace processess.

    mutex is not a proper synchronization primitive though, as the hid-debug
    callbacks are being called from atomic contexts.

    We also have to be careful about disabling IRQs when taking the lock
    to prevent deadlock against IRQ handlers.

    Benjamin reports this has also been reported in RH bugzilla as bug #958935.

    ===============================
    [ INFO: suspicious RCU usage. ]
    3.9.0+ #94 Not tainted
    -------------------------------
    include/linux/rcupdate.h:476 Illegal context switch in RCU read-side critical section!

    other info that might help us debug this:

    rcu_scheduler_active = 1, debug_locks = 0
    4 locks held by Xorg/5502:
    #0: (&evdev->mutex){+.+...}, at: [] evdev_write+0x6d/0x160
    #1: (&(&dev->event_lock)->rlock#2){-.-...}, at: [] input_inject_event+0x5b/0x230
    #2: (rcu_read_lock){.+.+..}, at: [] input_inject_event+0x42/0x230
    #3: (&(&usbhid->lock)->rlock){-.....}, at: [] usb_hidinput_input_event+0x89/0x120

    stack backtrace:
    CPU: 0 PID: 5502 Comm: Xorg Not tainted 3.9.0+ #94
    Hardware name: Dell Inc. OptiPlex 390/0M5DCD, BIOS A09 07/24/2012
    0000000000000001 ffff8800689c7c38 ffffffff816f249f ffff8800689c7c68
    ffffffff810acb1d 0000000000000000 ffffffff81a03ac7 000000000000019d
    0000000000000000 ffff8800689c7c90 ffffffff8107cda7 0000000000000000
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] lockdep_rcu_suspicious+0xfd/0x130
    [] __might_sleep+0xc7/0x230
    [] mutex_lock_nested+0x40/0x3a0
    [] ? vsnprintf+0x354/0x640
    [] hid_debug_event+0x34/0x100
    [] hid_dump_input+0x67/0xa0
    [] hid_set_field+0x50/0x120
    [] usb_hidinput_input_event+0x9a/0x120
    [] input_handle_event+0x8e/0x530
    [] input_inject_event+0x1d0/0x230
    [] ? input_inject_event+0x42/0x230
    [] evdev_write+0xde/0x160
    [] vfs_write+0xc8/0x1f0
    [] SyS_write+0x55/0xa0
    [] system_call_fastpath+0x16/0x1b
    BUG: sleeping function called from invalid context at kernel/mutex.c:413
    in_atomic(): 1, irqs_disabled(): 1, pid: 5502, name: Xorg
    INFO: lockdep is turned off.
    irq event stamp: 1098574
    hardirqs last enabled at (1098573): [] _raw_spin_unlock_irqrestore+0x3f/0x70
    hardirqs last disabled at (1098574): [] _raw_spin_lock_irqsave+0x25/0xa0
    softirqs last enabled at (1098306): [] __do_softirq+0x18f/0x3c0
    softirqs last disabled at (1097867): [] irq_exit+0xa5/0xb0
    CPU: 0 PID: 5502 Comm: Xorg Not tainted 3.9.0+ #94
    Hardware name: Dell Inc. OptiPlex 390/0M5DCD, BIOS A09 07/24/2012
    ffffffff81a03ac7 ffff8800689c7c68 ffffffff816f249f ffff8800689c7c90
    ffffffff8107ce60 0000000000000000 ffff8800689c7fd8 ffff88006a62c800
    ffff8800689c7d10 ffffffff816f7770 ffff8800689c7d00 ffffffff81312ac4
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] __might_sleep+0x180/0x230
    [] mutex_lock_nested+0x40/0x3a0
    [] ? vsnprintf+0x354/0x640
    [] hid_debug_event+0x34/0x100
    [] hid_dump_input+0x67/0xa0
    [] hid_set_field+0x50/0x120
    [] usb_hidinput_input_event+0x9a/0x120
    [] input_handle_event+0x8e/0x530
    [] input_inject_event+0x1d0/0x230
    [] ? input_inject_event+0x42/0x230
    [] evdev_write+0xde/0x160
    [] vfs_write+0xc8/0x1f0
    [] SyS_write+0x55/0xa0
    [] system_call_fastpath+0x16/0x1b

    Reported-by: majianpeng
    Reported-by: Benjamin Tissoires
    Reviewed-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

01 May, 2013

1 commit

  • It looks like the manual merge 0d69a3c731e120b05b7da9fb976830475a3fbc01 ("Merge
    branches 'for-3.9/sony' and 'for-3.9/steelseries' into for-linus") accidentally
    removed Sony RF receiver with USB product id 0x0374 from the "have special
    driver" list, effectively nullifying a464918419f94a0043d2f549d6defb4c3f69f68a
    ("HID: add support for Sony RF receiver with USB product id 0x0374"). Add the
    device back to the list.

    Cc: stable@vger.kernel.org
    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Jiri Kosina

    Fernando Luis Vázquez Cao
     

30 Apr, 2013

5 commits


29 Apr, 2013

1 commit


19 Apr, 2013

1 commit

  • This driver was originally written by James McKenzie, updated by
    Greg Kroah-Hartman, further updated by Bastien Nocera, with suspend
    support added.
    I ported it to the HID subsystem, in order to simplify it a litle
    and allow lirc to use it through hiddev.

    More recent versions of the IR receiver are also supported through
    a patch by Alex Karpenko. The patch also adds support for the 2nd
    and 5th generation of the controller, and the menu key on newer
    brushed metal remotes.

    Tested-by: Fabien André
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

04 Apr, 2013

1 commit

  • This adds the 2nd generation Wii Remote IDs. They have a different
    Bluetooth chipset (CSR instead of Broadcom) and are more restrictive in
    what they accept as input. Hence, you need up-to-date BlueZ and
    Bluetooth HIDP modules to use these devices.

    Signed-off-by: David Herrmann
    Signed-off-by: Jiri Kosina

    David Herrmann
     

29 Mar, 2013

1 commit

  • This patch reverts commit 0322bd3980 ("usb hid quirks for Masterkit MA901 usb
    radio") and adds checks in hid_ignore() for Masterkit MA901 usb radio device.
    This usb radio device shares USB ID with many Atmel V-USB (and probably other)
    devices so patch sorts things out by checking name, vendor, product of hid device.

    Signed-off-by: Alexey Klimov
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Jiri Kosina

    Alexey Klimov
     

14 Mar, 2013

1 commit


09 Mar, 2013

1 commit


01 Mar, 2013

1 commit

  • This patch separates struct hid_device's driver_lock into two. The
    goal is to allow hid device drivers to receive input during their
    probe() or remove() function calls. This is necessary because some
    drivers need to communicate with the device to determine parameters
    needed during probe (e.g., size of a multi-touch surface), and if
    possible, may perfer to communicate with a device on host-initiated
    disconnect (e.g., to put it into a low-power state).

    Historically, three functions used driver_lock:

    - hid_device_probe: blocks to acquire lock
    - hid_device_remove: blocks to acquire lock
    - hid_input_report: if locked returns -EBUSY, else acquires lock

    This patch adds another lock (driver_input_lock) which is used to
    block input from occurring. The lock behavior is now:

    - hid_device_probe: blocks to acq. driver_lock, then driver_input_lock
    - hid_device_remove: blocks to acq. driver_lock, then driver_input_lock
    - hid_input_report: if driver_input_lock locked returns -EBUSY, else
    acquires driver_input_lock

    This patch also adds two helper functions to be called during probe()
    or remove(): hid_device_io_start() and hid_device_io_stop(). These
    functions lock and unlock, respectively, driver_input_lock; they also
    make a note of whether they did so that hid-core knows if a driver has
    changed the lock state.

    This patch results in no behavior change for existing devices and
    drivers. However, during a probe() or remove() function call in a
    driver, that driver may now selectively call hid_device_io_start() to
    let input events come through, then optionally call
    hid_device_io_stop() to stop them.

    Signed-off-by: Andrew de los Reyes
    Signed-off-by: Jiri Kosina

    Andrew de los Reyes
     

25 Feb, 2013

2 commits

  • Instead of limiting HID sensors to USB and I2C busses we can just make
    everything that has usage page of HID_UP_SENSOR to be included in
    HID_GROUP_SENSOR_HUB group. This allows the sensor-hub to work over
    bluetooth (and other transports) as well.

    Reported-by: Alexander Holler
    Signed-off-by: Mika Westerberg
    Reviewed-By: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Mika Westerberg
     
  • Pull media updates from Mauro Carvalho Chehab:

    - Some cleanups at V4L2 documentation

    - new drivers: ts2020 frontend, ov9650 sensor, s5c73m3 sensor,
    sh-mobile veu mem2mem driver, radio-ma901, davinci_vpfe staging
    driver

    - Lots of missing MAINTAINERS entries added

    - several em28xx driver improvements, including its conversion to
    videobuf2

    - several fixups on drivers to make them to better comply with the API

    - DVB core: add support for DVBv5 stats, allowing the implementation of
    statistics for new standards like ISDB

    - mb86a20s: add statistics to the driver

    - lots of new board additions, cleanups, and driver improvements.

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (596 commits)
    [media] media: Add 0x3009 USB PID to ttusb2 driver (fixed diff)
    [media] rtl28xxu: Add USB IDs for Compro VideoMate U620F
    [media] em28xx: add usb id for terratec h5 rev. 3
    [media] media: rc: gpio-ir-recv: add support for device tree parsing
    [media] mceusb: move check earlier to make smatch happy
    [media] radio-si470x doc: add info about v4l2-ctl and sox+alsa
    [media] staging: media: Remove unnecessary OOM messages
    [media] sh_vou: Use vou_dev instead of vou_file wherever possible
    [media] sh_vou: Use video_drvdata()
    [media] drivers/media/platform/soc_camera/pxa_camera.c: use devm_ functions
    [media] mt9t112: mt9t111 format set up differs from mt9t112
    [media] sh-mobile-ceu-camera: fix SHARPNESS control default
    Revert "[media] fc0011: Return early, if the frequency is already tuned"
    [media] cx18/ivtv: fix regression: remove __init from a non-init function
    [media] em28xx: fix analog streaming with USB bulk transfers
    [media] stv0900: remove unnecessary null pointer check
    [media] fc0011: Return early, if the frequency is already tuned
    [media] fc0011: Add some sanity checks and cleanups
    [media] fc0011: Fix xin value clamping
    Revert "[media] [PATH,1/2] mxl5007 move reset to attach"
    ...

    Linus Torvalds
     

21 Feb, 2013

2 commits


19 Feb, 2013

1 commit

  • The ThingM blink(1) is an open source hardware USB RGB LED. It contains
    an internal EEPROM, allowing to configure up to 12 light patterns. A
    light pattern is a RGB color plus a fade time. This driver registers a
    LED class instance with additional sysfs attributes to support basic
    functions such as setting RGB colors, fade and playing. Other functions
    are still accessible through the hidraw interface.

    At this time, the only documentation for the device is the firmware
    source code from ThingM, plus a few schematics. They are available at:

    https://github.com/todbot/blink1

    This patch is version 3. It updates the name of the source file, the
    driver and the led sysfs entry, according to comments from Jiri Kosina
    and Simon Wood.

    Signed-off-by: Vivien Didelot
    Signed-off-by: Jiri Kosina

    Vivien Didelot
     

18 Feb, 2013

2 commits


05 Feb, 2013

1 commit


31 Jan, 2013

1 commit


17 Jan, 2013

1 commit

  • Add support for another gamepad to the hid-pl driver. The "color rumble pad
    P580" marketed using the "Saitek" brand in Germany, and using a USB Vendor ID
    attributed to "Jess" seems to be electronically identical to the 4-field
    variant of the "Green Asia" gamepad.

    The pad has been tested to support rumble strengths up to 255, not just 127.

    Signed-off-by: Michael Karcher
    Signed-off-by: Jiri Kosina

    Michael Karcher
     

16 Jan, 2013

1 commit

  • Some Vaio desktop computers, among them the VGC-LN51JGB multimedia PC, have
    a RF receiver, multi-interface USB device 054c:0374, that is used to connect
    a wireless keyboard and a wireless mouse.

    The keyboard works flawlessly, but the mouse (VGP-WMS3 in my case) does not
    seem to be generating any pointer events. The problem is that the mouse pointer
    is wrongly declared as a constant non-data variable in the report descriptor
    (see lsusb and usbhid-dump output below), with the consequence that it is
    ignored by the HID code.

    Add this device to the have-special-driver list and fix up the report
    descriptor in the Sony-specific driver which happens to already have a fixup
    for a similar firmware bug.

    # lsusb -vd 054C:0374
    Bus 003 Device 002: ID 054c:0374 Sony Corp.
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 8
    idVendor 0x054c Sony Corp.
    idProduct 0x0374
    iSerial 0
    [...]
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 1 Boot Interface Subclass
    bInterfaceProtocol 2 Mouse
    iInterface 2 RF Receiver
    [...]
    Report Descriptor: (length is 100)
    [...]
    Item(Global): Usage Page, data= [ 0x01 ] 1
    Generic Desktop Controls
    Item(Local ): Usage, data= [ 0x30 ] 48
    Direction-X
    Item(Local ): Usage, data= [ 0x31 ] 49
    Direction-Y
    Item(Global): Report Count, data= [ 0x02 ] 2
    Item(Global): Report Size, data= [ 0x08 ] 8
    Item(Global): Logical Minimum, data= [ 0x81 ] 129
    Item(Global): Logical Maximum, data= [ 0x7f ] 127
    Item(Main ): Input, data= [ 0x07 ] 7
    Constant Variable Relative No_Wrap Linear
    Preferred_State No_Null_Position Non_Volatile Bitfield

    # usbhid-dump
    003:002:001:DESCRIPTOR 1357910009.758544
    05 01 09 02 A1 01 05 01 09 02 A1 02 85 01 09 01
    A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01
    81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02
    75 08 15 81 25 7F 81 07 A1 02 85 01 09 38 35 00
    45 00 15 81 25 7F 95 01 75 08 81 06 C0 A1 02 85
    01 05 0C 15 81 25 7F 95 01 75 08 0A 38 02 81 06
    C0 C0 C0 C0

    Cc: linux-input@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Jiri Kosina

    Fernando Luis Vázquez Cao
     

28 Dec, 2012

1 commit


13 Dec, 2012

1 commit


12 Dec, 2012

2 commits

  • Those IDs aren't necessary anymore.

    This reverts commit c8147d9ea19bfe7d8e569351bc7239e118dd6997.

    Signed-off-by: Alexander Holler
    Acked-by: "Pandruvada, Srinivas"
    Signed-off-by: Jiri Kosina

    Alexander Holler
     
  • It should not be necessary to add IDs for HID sensor hubs to lists in
    hid-core.c and hid-sensor-hub.c. So instead of a whitelist, autodetect such USB
    HID sensor hubs, based on a collection of type physical inside a useage page of
    type sensor. If some sensor hubs stil must be usable as raw devices, a
    blacklist might be created.

    Signed-off-by: Alexander Holler
    Acked-by: "Pandruvada, Srinivas"
    Signed-off-by: Jiri Kosina

    Alexander Holler