16 Nov, 2012

1 commit


12 Nov, 2012

1 commit

  • In patch "HID: microsoft: fix invalid rdesc for 3k kbd" I fixed
    support for MS 3k keyboards. However the added check using memcmp and
    a compound statement breaks build on architectures where memcmp is a
    macro with parameters.

    hid-microsoft.c:51:18: error: macro "memcmp" passed 6 arguments, but takes just 3

    On x86_64, memcmp is a function, so I did not see the error.

    Signed-off-by: Jiri Slaby
    Reported-by: Geert Uytterhoeven
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     

09 Nov, 2012

1 commit


01 Nov, 2012

2 commits

  • This basically reverts commit 4fe9f8e203fda. It causes multiple problems,
    namely:

    - after rmmod/modprobe cycle of bus driver, the input is not claimed any
    more. This is likely because of misplaced hid_hw_close()
    - it causes memory corruption on hidraw_list

    As original patch author is not responding to requests to fix his patch,
    and the original deallocation mechanism is not exposing any problems, I
    am reverting back to it.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Pull HID updates from Jiri Kosina:
    "This contains fixes for two devices by Jiri Slaby and Xianhan Yu, new
    device IDs for MacBook Pro 10,2 from Dirk Hohndel and generic
    multitouch code fix from Alan Cox."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: Add support for the MacBook Pro 10,2 keyboard / touchpad
    HID: multitouch: fix maxcontacts problem on GeneralTouch
    HID: multitouch: put the case in the right switch statement
    HID: microsoft: fix invalid rdesc for 3k kbd

    Linus Torvalds
     

31 Oct, 2012

4 commits

  • This enables the existing drivers for keyboard and touchpad with the new
    USB IDs found on the MBP 13" Reasonable Resolution (also known as the
    Retina Display).

    Added entries to both keyboard and mouse ignore lists.

    Signed-off-by: Dirk Hohndel
    Signed-off-by: Jiri Kosina

    Dirk Hohndel
     
  • Fix maxcontacts problem for PWT GeneralTouch multi-touchscreen.

    Our device didn't contain HID_DG_CONTACTMAX usage. This usage use to describe
    touchscreen's maxcontacts for hid-multitouch.c to get maxcontacts automatic. We
    fix the device that driver can get maxcontact from our device, hence it doesn't
    need .maxcontact=10. Now there is just one device class can fix all our PWT
    touchscreen.

    Signed-off-by: Xianhan Yu
    Signed-off-by: Jiri Kosina

    Xianhan Yu
     
  • Signed-off-by: Alan Cox
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Alan Cox
     
  • Microsoft Digital Media Keyboard 3000 has two interfaces, and the
    second one has a report descriptor with a bug. The second collection
    says:
    05 01 -- global; usage page -- 01 -- Generic Desktop Controls
    09 80 -- local; usage -- 80 -- System Control
    a1 01 -- main; collection -- 01 -- application

    85 03 -- global; report ID -- 03
    19 00 -- local; Usage Minimum -- 00
    29 ff -- local; Usage Maximum -- ff
    15 00 -- global; Logical Minimum -- 0
    26 ff 00 -- global; Logical Maximum -- ff
    81 00 -- main; input

    c0 -- main; End Collection

    I.e. it makes us think that there are all kinds of usages of system
    control. That the keyboard is a not only a keyboard, but also a
    joystick, mouse, gamepad, keypad, etc. The same as for the Wireless
    Desktop Receiver, this should be Physical Min/Max. So fix that
    appropriately.

    References: https://bugzilla.novell.com/show_bug.cgi?id=776834
    Cc:
    Signed-off-by: Jiri Slaby
    Signed-off-by: Jiri Kosina

    Jiri Slaby
     

03 Oct, 2012

1 commit

  • Pull workqueue changes from Tejun Heo:
    "This is workqueue updates for v3.7-rc1. A lot of activities this
    round including considerable API and behavior cleanups.

    * delayed_work combines a timer and a work item. The handling of the
    timer part has always been a bit clunky leading to confusing
    cancelation API with weird corner-case behaviors. delayed_work is
    updated to use new IRQ safe timer and cancelation now works as
    expected.

    * Another deficiency of delayed_work was lack of the counterpart of
    mod_timer() which led to cancel+queue combinations or open-coded
    timer+work usages. mod_delayed_work[_on]() are added.

    These two delayed_work changes make delayed_work provide interface
    and behave like timer which is executed with process context.

    * A work item could be executed concurrently on multiple CPUs, which
    is rather unintuitive and made flush_work() behavior confusing and
    half-broken under certain circumstances. This problem doesn't
    exist for non-reentrant workqueues. While non-reentrancy check
    isn't free, the overhead is incurred only when a work item bounces
    across different CPUs and even in simulated pathological scenario
    the overhead isn't too high.

    All workqueues are made non-reentrant. This removes the
    distinction between flush_[delayed_]work() and
    flush_[delayed_]_work_sync(). The former is now as strong as the
    latter and the specified work item is guaranteed to have finished
    execution of any previous queueing on return.

    * In addition to the various bug fixes, Lai redid and simplified CPU
    hotplug handling significantly.

    * Joonsoo introduced system_highpri_wq and used it during CPU
    hotplug.

    There are two merge commits - one to pull in IRQ safe timer from
    tip/timers/core and the other to pull in CPU hotplug fixes from
    wq/for-3.6-fixes as Lai's hotplug restructuring depended on them."

    Fixed a number of trivial conflicts, but the more interesting conflicts
    were silent ones where the deprecated interfaces had been used by new
    code in the merge window, and thus didn't cause any real data conflicts.

    Tejun pointed out a few of them, I fixed a couple more.

    * 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits)
    workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending()
    workqueue: use cwq_set_max_active() helper for workqueue_set_max_active()
    workqueue: introduce cwq_set_max_active() helper for thaw_workqueues()
    workqueue: remove @delayed from cwq_dec_nr_in_flight()
    workqueue: fix possible stall on try_to_grab_pending() of a delayed work item
    workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback()
    workqueue: use __cpuinit instead of __devinit for cpu callbacks
    workqueue: rename manager_mutex to assoc_mutex
    workqueue: WORKER_REBIND is no longer necessary for idle rebinding
    workqueue: WORKER_REBIND is no longer necessary for busy rebinding
    workqueue: reimplement idle worker rebinding
    workqueue: deprecate __cancel_delayed_work()
    workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()
    workqueue: use mod_delayed_work() instead of __cancel + queue
    workqueue: use irqsafe timer for delayed_work
    workqueue: clean up delayed_work initializers and add missing one
    workqueue: make deferrable delayed_work initializer names consistent
    workqueue: cosmetic whitespace updates for macro definitions
    workqueue: deprecate system_nrt[_freezable]_wq
    workqueue: deprecate flush[_delayed]_work_sync()
    ...

    Linus Torvalds
     

02 Oct, 2012

1 commit

  • Pull staging tree update from Greg Kroah-Hartman:
    "Here is the big staging tree update for the 3.7-rc1 merge window.

    There are a few patches in here that are outside of the staging area,
    namely HID and IIO patches, but all of them have been acked by the
    relevant subsystem maintainers. The IIO stuff is still coming in
    through this tree as it hasn't entirely moved out of the staging tree,
    but is almost there.

    Other than that, there wa a ton of work on the comedi drivers to make
    them more readable and the correct style. Doing that removed a lot of
    code, but we added a new driver to the staging tree, so we didn't end
    up with a net reduction this time around:

    662 files changed, 51649 insertions(+), 26582 deletions(-)

    All of these patches have been in the linux-next tree already.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'staging-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1094 commits)
    staging: comedi: jr3_pci: fix iomem dereference
    staging: comedi: drivers: use comedi_fc.h cmdtest helpers
    Staging: winbond: usb_free_urb(NULL) is safe
    Staging: winbond: checkpatch cleanup
    Staging: winbond: Removed undesired spaces, lines and tabs
    Staging: winbond: Typo corrections in comments
    Staging: winbond: Changed c99 comments to c89 comments
    staging: r8712u: Do not queue cloned skb
    staging: comedi: ni_mio_common: always lock in ni_ai_poll()
    staging: comedi: s626: add FIXME comment
    staging: comedi: s626: don't dereference insn->data
    staging: comedi: s526: fix if() check in s526_gpct_winsn()
    staging: comedi: s626: cleanup comments in s626_initialize()
    staging: comedi: s626: remove clear of kzalloc'ed data
    staging: comedi: s626: remove 'WDInterval' from private data
    staging: comedi: s626: remove 'ChargeEnabled' from private data
    staging: comedi: s626: remove 'IsBoardRevA' comment
    staging: comedi: s626: #if 0 out the "SAA7146 BUG WORKAROUND"
    staging: comedi: s626: remove 'allocatedBuf' from private data
    staging: comedi: s626: add final attach message
    ...

    Linus Torvalds
     

01 Oct, 2012

8 commits


25 Sep, 2012

6 commits

  • Fixes a couple of minor coding style issues.

    Signed-off-by: Michal Malý
    Signed-off-by: Jiri Kosina

    Michal Malý
     
  • The lg4ff driver doesn't fill the "input_absinfo" struct so it is left
    with default values. Applications with rely on information in this struct
    therefore do not work correctly with the wheel.

    Other Logitech wheels probably need this fix too, but again I do not have
    enough information to write it.

    Signed-off-by: Michal Malý
    Signed-off-by: Jiri Kosina

    Michal Malý
     
  • Range limiting command for the Driving Force Pro wheel is only a FF_SPRING
    effect so that the wheel creates resistance when the user tries to turn it past
    the limit. It is however possible to overpower the FFB motors quite easily which
    leads to the X axis value exceeding the expected limit. This confuses
    games which dynamically adjust calibration using the highest/lowest min and max
    values reported by the wheel. Joydev device driver also doesn't take in account
    any changes in an axis range after the joystick device is created.

    This patch recalculates received ABS_X axis value so it is always in
    range where 0 is the left limit and 16383 the right limit.
    Logitech driver for Windows does the same thing. As for any concerns about
    possible loss of precision, I compared a large set of raw/adjusted values
    generated by "mult_frac" to values returned by the Windows driver and I got
    a 100% match.

    Other Logitech wheels will probably need a similar fix, but I currently lack
    the information needed to write one.

    Signed-off-by: Michal Malý
    Signed-off-by: Jiri Kosina

    Michal Malý
     
  • This patch replaces all occurrences of "report->field[0]->value[n]" with just
    "value[n]" to get rid of the lengthy trains we have now.

    Signed-off-by: Michal Malý
    Signed-off-by: Jiri Kosina

    Michal Malý
     
  • Since something will be divided by these variables in
    show_min_width()/show_min_height() and show_activate_width()/
    show_activate_height(), a divided error would be triggered if
    they are zero.

    Signed-off-by: Wen-chien Jesse Sung
    Acked-by: Rafi Rubin
    Signed-off-by: Jiri Kosina

    Wen-chien Jesse Sung
     
  • Make sure we keep enough space for terminating NUL character after last
    newline. If we have too much data, replace last byte with '.'s to
    make overflow visible.

    Using hex_dump_to_buffer() is not interesting as it adds more overhead
    and does not append the trailing linefeed.

    Reported-by: Dan Carpenter
    Signed-off-by: Bruno Prémont
    Signed-off-by: Jiri Kosina

    Bruno Prémont
     

22 Sep, 2012

4 commits

  • Fix below issues:
    1. In the case of goto err_close, hid_hw_stop(hdev) is called twice. Fix it.
    2. If fails to allocate MFD device name, we also need to free all
    successfully allocated names in previous iterations.
    3. In sensor_hub_remove(), Call hid_hw_close() before hid_hw_stop().
    4. Adjust unnecessary change lines for hid_err.

    Signed-off-by: Axel Lin
    Acked-by: Jiri Kosina
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jonathan Cameron

    Axel Lin
     
  • Current implementation of hid_hw_start() allows connect_mask to be 0.
    Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start()
    is not necessary. Remove it.

    Signed-off-by: Axel Lin
    Acked-by: Jiri Kosina
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jonathan Cameron

    Axel Lin
     
  • This patch fixes an issue introduced after commit 4ea5454203d991ec
    ("HID: Fix race condition between driver core and ll-driver").

    After that commit, hid-core discards any incoming packet that arrives while
    hid driver's probe function is being executed.

    This broke the enumeration process of hid-logitech-dj, that must receive
    control packets in-band with the mouse and keyboard packets. Discarding mouse
    or keyboard data at the very begining is usually fine, but it is not the case
    for control packets.

    This patch forces a re-enumeration of the paired devices when a packet arrives
    that comes from an unknown device.

    Based on a patch originally written by Benjamin Tissoires.

    Cc: stable@vger.kernel.org # v3.2+
    Signed-off-by: Nestor Lopez Casado
    Signed-off-by: Jiri Kosina

    Nestor Lopez Casado
     
  • We need to kfree names for led_mute and led_micmute in tpkbd_remove_tp().

    Signed-off-by: Axel Lin
    Acked-by: Bernhard Seibold
    Signed-off-by: Jiri Kosina

    Axel Lin
     

20 Sep, 2012

7 commits

  • Pull Input and HID updates for 3.7 from Henrik Rydberg:
    "The tree contains input core changes, Acked by Dmitry, which substantially
    reduces the irqsoff latency for all input devices. It also contains MT changes
    which allows further memory reduction, speedup and hardware support in the HID
    Multitouch driver. Lastly, you get the conversion of the bcm5974 driver to
    MT-B, which due to the mixed dependency of the tree fits better here than
    anywhere else."

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Add support for the Flatfrog Multitouch 3200 panel. This panel
    advertises some fields that it does not use, hence the new quirk.

    Cc: Pablo Cases
    Acked-by: Jiri Kosina
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     
  • Some devices report the number of contacts via the unreliable
    CONTACTCOUNT usage, rather than using the CONTACTMAX feature.
    Without this patch, the 3M devices are constrained to the default
    maximum of ten fingers.

    Cc: Benjamin Tissoires
    Acked-by: Jiri Kosina
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     
  • With the input_mt_sync_frame() function in place, there is no longer
    any need to keep the full touch state in the driver. This patch
    removes the slot state and replaces the lookup code with the input-mt
    equivalent.

    Reviewed-and-tested-by: Benjamin Tissoires
    Acked-by: Jiri Kosina
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     
  • With the input_configured() callback in place, the setup and frame
    synchronization can be simplified. The input device initialization is
    moved to mt_input_configured(), to make sure the full HID report has been
    seen.

    Reviewed-and-tested-by: Benjamin Tissoires
    Acked-by: Jiri Kosina
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     
  • A hid device may create several input devices, and a driver may need
    to prepare or finalize the configuration per input device. Currently,
    there is no sane way for a driver to know when a device has been
    configured. This patch adds a callback providing that information.

    Reviewed-and-tested-by: Benjamin Tissoires
    Tested-by: Ping Cheng
    Acked-by: Jiri Kosina
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     
  • Preparing to move more repeated code into the mt core, add a flags
    argument to the input_mt_slots_init() function.

    Reviewed-and-tested-by: Benjamin Tissoires
    Tested-by: Ping Cheng
    Acked-by: Dmitry Torokhov
    Signed-off-by: Henrik Rydberg

    Henrik Rydberg
     

19 Sep, 2012

4 commits

  • Current implementation of hid_hw_start() allows connect_mask to be 0.
    Setting hdev->claimed = HID_CLAIMED_INPUT before calling hid_hw_start() is not
    necessary. Remove it.

    Signed-off-by: Axel Lin
    Acked-By: Bruno Prémont
    Signed-off-by: Jiri Kosina

    Axel Lin
     
  • Commit 4ea5454203d991ec85264f64f89ca8855fce69b0
    [HID: Fix race condition between driver core and ll-driver] introduced
    new locking around probe/remove functions that prevents any report/reply
    from hardware to reach driver until it returned from probe.

    As such, the ask-reply way to checking picoLCD firmware version during
    probe is bound to timeout and let probe fail.

    Drop the check to let driver successfully probe again (until locking issues
    are resolved allowing to reinstate the check).

    Signed-off-by: Bruno Prémont
    Signed-off-by: Jiri Kosina

    Bruno Prémont
     
  • OLEDs/LED are not critical for tablet functioning thus ignore OLED/LED
    initialisation failures.

    This patch does clean up all the sysfs attribute files in error paths.

    Signed-off-by: Axel Lin
    Tested-by: Przemo Firszt
    Signed-off-by: Jiri Kosina

    Axel Lin
     
  • "report_id" is unsigned so it's never less than zero. These checks can
    be removed without any problem.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Jiri Kosina
    Signed-off-by: Jonathan Cameron

    Dan Carpenter