10 Oct, 2014

1 commit

  • Pull GPIO changes from Linus Walleij:
    "This is the bulk of GPIO changes for the v3.18 development cycle:

    - Increase the default ARCH_NR_GPIO from 256 to 512. This was done
    to avoid having a custom header for the x86
    architecture - GPIO is custom and complicated enough as it is
    already! We want to move to a radix to store the descriptors going
    forward, and finally get rid of this fixed array size altogether.

    - Endgame patching of the gpio_remove() semantics initiated by
    Abdoulaye Berthe. It is not accepted by the system that the
    removal of a GPIO chip fails during eg reboot or shutdown, and
    therefore the return value has now painfully been refactored away.
    For special cases like GPIO expanders on a hot-pluggable bus like
    USB, we may later add some gpiochip_try_remove() call, but for the
    cases we have now, return values are moot.

    - Some incremental refactoring of the gpiolib core and ACPI GPIO
    library for more descriptor usage.

    - Refactor the chained IRQ handler set-up method to handle also
    threaded, nested interrupts and set up the parent IRQ correctly.
    Switch STMPE and TC3589x drivers to use this registration method.

    - Add a .irq_not_threaded flag to the struct gpio_chip, so that also
    GPIO expanders that block but are still not using threaded IRQ
    handlers.

    - New drivers for the ARM64 X-Gene SoC GPIO controller.

    - The syscon GPIO driver has been improved to handle the "DSP GPIO"
    found on the TI Keystone 2 SoC:s.

    - ADNP driver switched to use gpiolib irqchip helpers.

    - Refactor the DWAPB driver to support being instantiated from and
    MFD cell (platform device).

    - Incremental feature improvement in the Zynq, MCP23S08, DWAPB, OMAP,
    Xilinx and Crystalcove drivers.

    - Various minor fixes"

    * tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (52 commits)
    gpio: pch: Build context save/restore only for PM
    pinctrl: abx500: get rid of unused variable
    gpio: ks8695: fix 'else should follow close brace '}''
    gpio: stmpe: add verbose debug code
    gpio: stmpe: fix up interrupt enable logic
    gpio: staticize xway_stp_init()
    gpio: handle also nested irqchips in the chained handler set-up
    gpio: set parent irq on chained handlers
    gpiolib: irqchip: use irq_find_mapping while removing irqchip
    gpio: crystalcove: support virtual GPIO
    pinctrl: bcm281xx: make Kconfig dependency more strict
    gpio: kona: enable only on BCM_MOBILE or for compile testing
    gpio, bcm-kona, LLVMLinux: Remove use of __initconst
    gpio: Fix ngpio in gpio-xilinx driver
    gpio: dwapb: fix pointer to integer cast
    gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard
    gpio: xgene: Remove unneeded forward declation for struct xgene_gpio
    gpio: xgene: Fix missing spin_lock_init()
    gpio: ks8695: fix switch case indentation
    gpiolib: add irq_not_threaded flag to gpio_chip
    ...

    Linus Torvalds
     

07 Oct, 2014

1 commit


02 Oct, 2014

1 commit

  • When uhid_get_report() or uhid_set_report() are called, they emit on the
    char device a UHID_GET_REPORT or UHID_SET_REPORT message. Then, the
    protocol says that the user space asnwers with UHID_GET_REPORT_REPLY
    or UHID_SET_REPORT_REPLY.

    Unfortunatelly, the current code waits for an event of type UHID_GET_REPORT
    or UHID_SET_REPORT instead of the reply one.
    Add 1 to UHID_GET_REPORT or UHID_SET_REPORT to actually wait for the
    reply, and validate the reply.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: David Herrmann
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

01 Oct, 2014

6 commits


25 Sep, 2014

1 commit


22 Sep, 2014

2 commits

  • Some Wacom tablets (at least the ISDv4 found in the Lenovo X230) timeout
    during probe while retrieving the input reports.
    The only time this information is valuable is during the feature_mapping
    stage, so we can ask for it there and discard the generic input reports
    retrieval.

    This gives a code path closer to the wacom.ko driver when it was in the
    input subtree (not HID).

    Cc: stable@vger.kernel.org # requires cherry-pick of c64d883476
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     
  • Set the DualShock4 touchpad bits in the input_configured callback
    so that they are registered properly for any input devices created
    during hid_hw_start.

    Signed-off-by: Frank Praznik
    Signed-off-by: Jiri Kosina

    Frank Praznik
     

19 Sep, 2014

1 commit


15 Sep, 2014

2 commits


13 Sep, 2014

1 commit

  • In the Dell XPS 13 9333, it appears that sometimes the bus get confused
    and corrupts the incoming data. It fills the input report with the
    sentinel value "ff". Synaptics told us that such behavior does not comes
    from the touchpad itself, so we filter out such reports here.

    Unfortunately, we can not simply discard the incoming data because they
    may contain useful information. Most of the time, the misbehavior is
    quite near the end of the report, so we can still use the valid part of
    it.

    Fixes:
    https://bugzilla.redhat.com/show_bug.cgi?id=1123584

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Andrew Duggan
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

12 Sep, 2014

1 commit

  • Currently, tablets connected to the WL receiver all share the same
    VID/PID. There is no way for the user space to know which one is which
    besides parsing the name. We can force the PID to be set to the
    actual hardware. This way, the input device will have the correct PID
    which can be match in libwacom.

    With only this trick, the pad input does not inherit the ID_INPUT_TABLET
    udev property from its parent. We can force udev to accept it by declaring
    a BTN_STYLUS which is never used.

    This way, tablets connected through WL can be used from the user point of
    view in the same way they are used while connected through wire.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Ping Cheng
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

11 Sep, 2014

4 commits


08 Sep, 2014

5 commits

  • This mouse keeps disconnecting in runlevel 3. It needs the ALWAYS_POLL quirk.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Oliver Neukum
     
  • The report descriptor for the HOLTEK USB ID 04d9:a0c2 (ETEKCITY Scroll
    T-140 Gaming Mouse) is set to a very large amount of consumer usages
    (2^16), exceeding HID_MAX_USAGES. Added id, bindings and comments for
    the mouse, added to hid_have_special_driver, and reduced the usage and
    logical maximums to 0x2fff, consistent with the other mice in the
    category. Tested on the hardware.

    Signed-off-by: John C. DeSilva
    Signed-off-by: Jiri Kosina

    John DeSilva
     
  • Signed-off-by: Hans Petter Selasky
    Signed-off-by: Jiri Kosina

    Hans Petter Selasky
     
  • Enable the always-poll quirk for Elan Touchscreens found on some recent
    Samsung laptops.

    Without this quirk the device keeps disconnecting from the bus (and is
    re-enumerated) unless opened (and kept open, should an input event
    occur).

    Note that while the device can be run-time suspended, the autosuspend
    timeout must be high enough to allow the device to be polled at least
    once before being suspended. Specifically, using autosuspend_delay_ms=0
    will still cause the device to disconnect on input events.

    Signed-off-by: Johan Hovold
    Signed-off-by: Jiri Kosina

    Johan Hovold
     
  • Add quirk to make sure that a device is always polled for input events
    even if it hasn't been opened.

    This is needed for devices that disconnects from the bus unless the
    interrupt endpoint has been polled at least once or when not responding
    to an input event (e.g. after having shut down X).

    Signed-off-by: Johan Hovold
    Signed-off-by: Jiri Kosina

    Johan Hovold
     

04 Sep, 2014

6 commits

  • This patch adds a seperate hid-penmount driver to work
    around an issue with the HID report descriptor. The
    descriptor does not contain the ContactID usage and as
    result the touchscreen is represented as normal mouse
    to the system.

    This driver maps the button 0 emitted by the touchscreen
    to BTN_TOUCH. This makes it possible to use touch events
    in userspace.

    Signed-off-by: Christian Gmeiner
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Christian Gmeiner
     
  • thingm_remove_rgb() needs to flush the workqueue after all the LED classes
    have been unregistered, otherwise the removal might race with another LED
    event coming, causing thingm_led_set() to schedule additional work after
    thingm_remove_rgb() has flushed it. This obviously causes oops later, as
    the scheduled work has been freed in the meantime.

    In addition to that, move the hid_hw_stop() to an earlier place, so that
    dmesg is not polluted by failure messages about not being able to write
    the LED while the device is being shut down.

    Reported-and-tested-by: Dylan Alex Simon
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Adding USB_DEVICE_ID_STM_HID_SENSOR again in the quirk table. During 3.16 merge
    cycle somehow quirk for device id USB_DEVICE_ID_STM_HID_SENSOR is missing.
    I see commit dde3b45cd74e ("HID: hid-sensor-hub: new device id and quirk
    for STM Sensor hub") added new id USB_DEVICE_ID_STM_HID_SENSOR_1,
    but didn't really delete the old device id.
    Anyway we need to add this back, otherwise it breaks ST sensor hubs.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada
     
  • In case of an unsupported firmware, the driver bails out without setting
    the LEDs interfaces, but forget to set the proper error code.
    err is then still equal to 0 and the hid subsytem consider the device
    to be in perfect shape.
    When removing it, thingm_remove() tries to unbind the rgb LEDs which
    has not been created, leading to a segfault.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     
  • The Wacom Cintiq Companion shares the same sensor than the Cintiq
    Companion Hybrid, with the exception of the different PIDs.

    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     
  • This patch changes the way usbhid carries out Clear-Halt and reset.

    Currently, after a Clear-Halt on the interrupt-IN endpoint, the driver
    immediately restarts the interrupt URB, even if the Clear-Halt failed.
    This doesn't work out well when the reason for the failure was that
    the device was disconnected (when a low- or full-speed device is
    connected through a hub to an EHCI controller, transfer errors caused
    by disconnection are reported as stalls by the hub). Instead now the
    driver will attempt a reset after a failed Clear-Halt.

    The way resets are carried out is also changed. Now the driver will
    call usb_queue_reset_device() instead of calling usb_reset_device()
    directly. This avoids a deadlock that would arise when a device is
    unplugged: The hid_reset() routine runs as a workqueue item, a reset
    attempt after the device has been unplugged will fail, failure will
    cause usbhid to be unbound, and the disconnect routine will try to do
    cancel_work_sync(). The usb_queue_reset_device() implementation is
    carefully written to handle scenarios like this one properly.

    Signed-off-by: Alan Stern
    Signed-off-by: Jiri Kosina

    Alan Stern
     

01 Sep, 2014

1 commit

  • Bit 3 in byte 31 of the Sixaxis report indicates whether the battery is
    charging or not charging as opposed to whether or not the cable is plugged in.
    As a result, when connected via USB and fully charged, the power_supply status
    is wrongly reported as 'Discharging' instead of 'Full'.

    Use the battery level value to set the cable state so that the power status
    is reported correctly as that seems to be the only reliable way to determine the
    cable status on the Sixaxis.

    Signed-off-by: Frank Praznik
    Signed-off-by: Jiri Kosina

    Frank Praznik
     

28 Aug, 2014

3 commits


27 Aug, 2014

2 commits


26 Aug, 2014

1 commit

  • Atmel 840B digitizer presents a stylus interface which reports twice
    the X coordinate and then twice the Y coordinate. In its current
    implementation, hid-input assign the first X to X, then the second to Y,
    then the first Y to Z, then the second one to RX.

    This is wrong, and X should always be mapped to X, no matter what.
    A solution consists in forcing X, Y, Z, RX, RY, RZ to be mapped to their
    correct user space counter part.

    Reported-by: Éric Brunet
    Signed-off-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

25 Aug, 2014

1 commit

  • This makes UHID_START include a "dev_flags" field that describes details
    of the hid-device in the kernel. The first flags we introduce describe
    whether a given report-type uses numbered reports. This is useful for
    transport layers that force report-numbers and therefore might have to
    prefix kernel-provided HID-messages with the report-number.

    Currently, only HoG needs this and the spec only talks about "global
    report numbers". That is, it's a global boolean not a per-type boolean.
    However, given the quirks we already have in kernel-space, a per-type
    value seems much more appropriate.

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

    David Herrmann