28 Jan, 2015

3 commits

  • commit 9333caeaeae4f831054e0e127a6ed3948b604d3e upstream.

    When KBC is in active multiplexing mode the touchpad on this laptop does
    not work.

    Reported-by: Bilal Koc
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • commit 148e9a711e034e06310a8c36b64957934ebe30f2 upstream.

    On some laptops, keyboard needs to be reset in order to successfully detect
    touchpad (e.g., some Gigabyte laptop models with Elantech touchpads).
    Without resettin keyboard touchpad pretends to be completely dead.

    Based on the original patch by Mateusz Jończyk this version has been
    expanded to include DMI based detection & application of the fix
    automatically on the affected models of laptops. This has been confirmed to
    fix problem by three users already on three different models of laptops.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81331
    Signed-off-by: Srihari Vijayaraghavan
    Acked-by: Mateusz Jończyk
    Tested-by: Srihari Vijayaraghavan
    Tested by: Zakariya Dehlawi
    Tested-by: Guillaum Bouchard
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Srihari Vijayaraghavan
     
  • commit 810aa0918b2b032684c8cad13f73d6ba37ad11c0 upstream.

    This change allows the driver to recognize newer Elantech touchpads.

    Signed-off-by: Yi ju Hong
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Sam hung
     

16 Jan, 2015

3 commits

  • commit d27eb7931c98a1ebfc9b2fcc48939846bcbfc804 upstream.

    Protocol v7 uses the middle / right button bits on clickpads to communicate
    "location" information of a 3th touch (and possible 4th) touch on
    clickpads.

    Specifically when 3 touches are down, if one of the 3 touches is in the
    left / right button area, this will get reported in the middle / right
    button bits and the touchpad will still send a TWO type packet rather then
    a MULTI type packet, so when this happens we must add the finger reported
    in the button area to the finger count.

    Likewise we must also add fingers reported this way to the finger count
    when we get MULTI packets.

    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86338
    Signed-off-by: Hans de Goede
    Tested-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 7091c443dda8c6c6d8e70e33452252f9ad3e7814 upstream.

    The v7 proto differentiates between a primary touch (with high precision)
    and a secondary touch (with lower precision). Normally when 2 fingers are
    down and one is lifted the still present touch becomes the primary touch,
    but some traces have shown that this does not happen always.

    This commit deals with this by making alps_get_mt_count() not stop at the
    first empty mt slot, and if a touch is present in mt[1] and not mt[0]
    moving the data to mt[0] (for input_mt_assign_slots).

    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86338
    Signed-off-by: Hans de Goede
    Tested-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 8b23811535d2e1dd6abbe4ce6ea1edfd50ce72de upstream.

    NEW packets are send to indicate a discontinuity in the finger coordinate
    reporting. Specifically a finger may have moved from slot 0 to 1 or vice
    versa. INPUT_MT_TRACK takes care of this for us.

    NEW packets have 3 problems:
    1) They do not contain middle / right button info (on non clickpads)
    this can be worked around by preserving the old button state
    2) They do not contain an accurate fingercount, and they are
    typically send when the number of fingers changes. We cannot use
    the old finger count as that may mismatch with the amount of
    touch coordinates we've available in the NEW packet
    3) Their x data for the second touch is inaccurate leading to
    a possible jump of the x coordinate by 16 units when the first
    non NEW packet comes in

    Since problems 2 & 3 cannot be worked around, just ignore them.

    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86338
    Signed-off-by: Hans de Goede
    Tested-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

04 Dec, 2014

1 commit

  • If kzalloc() failed and then evdev_open_device() fails, evdev_open()
    will pass a vmalloc'ed pointer to kfree.

    This might fix https://bugzilla.kernel.org/show_bug.cgi?id=88401, where
    there was a crash in kfree().

    Reported-by: Christian Casteyde
    Belatedly-Acked-by: Dmitry Torokhov
    Cc: Henrik Rydberg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

28 Nov, 2014

1 commit

  • Pull input layer fixes from Dmitry Torokhov:
    "The main change is to fix breakage in Elantech driver introduced by
    the recent commit adding trackpoint reporting to protocol v4. Now we
    are trusting the hardware to advertise the trackpoint properly and do
    not try to decode the data as trackpoint if firmware told us it is not
    present"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: xpad - use proper endpoint type
    Input: elantech - trust firmware about trackpoint presence
    Input: synaptics - adjust min/max on Thinkpad E540

    Linus Torvalds
     

25 Nov, 2014

2 commits

  • The xpad wireless endpoint is not a bulk endpoint on my devices, but
    rather an interrupt one, so the USB core complains when it is submitted.
    I'm guessing that the author really did mean that this should be an
    interrupt urb, but as there are a zillion different xpad devices out
    there, let's cover out bases and handle both bulk and interrupt
    endpoints just as easily.

    Signed-off-by: "Pierre-Loup A. Griffais"
    Signed-off-by: Greg Kroah-Hartman
    Cc: stable
    Signed-off-by: Dmitry Torokhov

    Greg Kroah-Hartman
     
  • Only try to parse data as coming from trackpoint if firmware told us that
    trackpoint is present.

    Fixes commit caeb0d37fa3e387eb0dd22e5d497523c002033d1

    Reported-and-tested-by: Marcus Overhagen
    Reported-and-tested-by: Anders Kaseorg
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

17 Nov, 2014

1 commit

  • The LEN2006 Synaptics touchpad (as found in Thinkpad E540) returns wrong
    min max values.

    touchpad-edge-detector output:
    > Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
    > Move one finger around the touchpad to detect the actual edges
    > Kernel says: x [1472..5674], y [1408..4684]
    > Touchpad sends: x [1264..5675], y [1171..4688]

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88211
    Cc: stable@vger.kernel.org
    Signed-off-by: Binyamin Sagal
    Signed-off-by: Dmitry Torokhov

    Ben Sagal
     

15 Nov, 2014

1 commit

  • Pull input subsystem updates from Dmitry Torokhov:
    "Mostly small fixups to PS/2 tochpad drivers (ALPS, Elantech,
    Synaptics) to better deal with specific hardware"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: elantech - update the documentation
    Input: elantech - provide a sysfs knob for crc_enabled
    Input: elantech - report the middle button of the touchpad
    Input: alps - ignore bad data on Dell Latitudes E6440 and E7440
    Input: alps - allow up to 2 invalid packets without resetting device
    Input: alps - ignore potential bare packets when device is out of sync
    Input: elantech - fix crc_enabled for Fujitsu H730
    Input: elantech - use elantech_report_trackpoint for hardware v4 too
    Input: twl4030-pwrbutton - ensure a wakeup event is recorded.
    Input: synaptics - add min/max quirk for Lenovo T440s

    Linus Torvalds
     

14 Nov, 2014

3 commits

  • The detection of crc_enabled is known to fail for Fujitsu H730. A DMI
    blacklist is added for that, but it can be expected that other laptops will
    pop up with this.

    Here a sysfs knob is provided to alter the behaviour of crc_enabled.
    Writing 0 or 1 to it sets the variable to 0 or 1. Reading it will show the
    crc_enabled variable (0 or 1).

    Reported-by: Stefan Valouch
    Signed-off-by: Ulrik De Bie
    Signed-off-by: Dmitry Torokhov

    Ulrik De Bie
     
  • In the past, no elantech was known with 3 touchpad mouse buttons.
    Fujitsu H730 is the first known elantech with a middle button. This commit
    enables this middle button. For backwards compatibility, the Fujitsu is
    detected via DMI, and only for this one 3 buttons will be announced.

    Reported-by: Stefan Valouch
    Signed-off-by: Ulrik De Bie
    Signed-off-by: Dmitry Torokhov

    Ulrik De Bie
     
  • Sometimes on Dell Latitude laptops psmouse/alps driver receive invalid ALPS
    protocol V3 packets with bit7 set in last byte. More often it can be
    reproduced on Dell Latitude E6440 or E7440 with closed lid and pushing
    cover above touchpad.

    If bit7 in last packet byte is set then it is not valid ALPS packet. I was
    told that ALPS devices never send these packets. It is not know yet who
    send those packets, it could be Dell EC, bug in BIOS and also bug in
    touchpad firmware...

    With this patch alps driver does not process those invalid packets, but
    instead of reporting PSMOUSE_BAD_DATA, getting into out of sync state,
    getting back in sync with the next byte and spam dmesg we return
    PSMOUSE_FULL_PACKET. If driver is truly out of sync we'll fail the checks
    on the next byte and report PSMOUSE_BAD_DATA then.

    Signed-off-by: Pali Rohár
    Tested-by: Pali Rohár
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Pali Rohár
     

10 Nov, 2014

1 commit

  • On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte
    in 6 bytes ALPS packet. In this case psmouse driver enter out of sync
    state. It looks like that all other bytes in packets are valid and also
    device working properly. So there is no need to do full device reset, just
    need to wait for byte which match condition for first byte (start of
    packet). Because ALPS packets are bigger (6 or 8 bytes) default limit is
    small.

    This patch increase number of invalid bytes to size of 2 ALPS packets which
    psmouse driver can drop before do full reset.

    Resetting ALPS devices take some time and when doing reset on some Dell
    laptops touchpad, trackstick and also keyboard do not respond. So it is
    better to do it only if really necessary.

    Signed-off-by: Pali Rohár
    Tested-by: Pali Rohár
    Reviewed-by: Hans de Goede
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Pali Rohár
     

09 Nov, 2014

1 commit

  • 5th and 6th byte of ALPS trackstick V3 protocol match condition for first
    byte of PS/2 3 bytes packet. When driver enters out of sync state and ALPS
    trackstick is sending data then driver match 5th, 6th and next 1st bytes as
    PS/2.

    It basically means if user is using trackstick when driver is in out of
    sync state driver will never resync. Processing these bytes as 3 bytes PS/2
    data cause total mess (random cursor movements, random clicks) and make
    trackstick unusable until psmouse driver decide to do full device reset.

    Lot of users reported problems with ALPS devices on Dell Latitude E6440,
    E6540 and E7440 laptops. ALPS device or Dell EC for unknown reason send
    some invalid ALPS PS/2 bytes which cause driver out of sync. It looks like
    that i8042 and psmouse/alps driver always receive group of 6 bytes packets
    so there are no missing bytes and no bytes were inserted between valid
    ones.

    This patch does not fix root of problem with ALPS devices found in Dell
    Latitude laptops but it does not allow to process some (invalid)
    subsequence of 6 bytes ALPS packets as 3 bytes PS/2 when driver is out of
    sync.

    So with this patch trackstick input device does not report bogus data when
    also driver is out of sync, so trackstick should be usable on those
    machines.

    Signed-off-by: Pali Rohár
    Tested-by: Pali Rohár
    Cc: stable@vger.kernel.org
    Reviewed-by: Hans de Goede
    Signed-off-by: Dmitry Torokhov

    Pali Rohár
     

08 Nov, 2014

3 commits


07 Nov, 2014

1 commit

  • The new Lenovo T440s laptop has a different PnP ID "LEN0039", and it
    needs the similar min/max quirk to make its clickpad working.

    BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=903748
    Reported-and-tested-by: Joschi Brauchle
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Dmitry Torokhov

    Takashi Iwai
     

01 Nov, 2014

5 commits

  • Pull input updates from Dmitry Torokhov:
    "A bunch of fixes for minor defects reported by Coverity, a few driver
    fixups and revert of i8042.nomux change so that we are once again
    enable active MUX mode if box claims to support it"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Revert "Input: i8042 - disable active multiplexing by default"
    Input: altera_ps2 - use correct type for irq return value
    Input: altera_ps2 - write to correct register when disabling interrupts
    Input: max77693-haptic - fix potential overflow
    Input: psmouse - remove unneeded check in psmouse_reconnect()
    Input: vsxxxaa - fix code dropping bytes from queue
    Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store()
    Input: opencores-kbd - fix error handling
    Input: wm97xx - adapt parameters to tosa touchscreen.
    Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544
    Input: stmpe-keypad - fix valid key line bitmask
    Input: soc_button_array - update calls to gpiod_get*()

    Linus Torvalds
     
  • This reverts commit 68da166491655bc54051bf04c78ce648e2e33508.

    It turns out that the assertion about scope of regressions due to
    always keeping keyboard controller in legacy mode was proven wrong.
    There are laptops, such as Clevo W650SH, that only have internal
    touchpad (no external PS/2 ports), that require active multiplexing
    mode to switch the touchpad (Elantech) into native mode instead of
    basic PS/2 emulation.

    Reported-by: Roel Aaij
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     
  • The irq function altera_ps2_rxint returns an irqreturn_t, so use the
    same type for variable storing the return value.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Dmitry Torokhov

    Tobias Klauser
     
  • In altera_ps2_close, the data register (offset 0) is written instead of
    the control register (offset 4), leading to the RX interrupt not being
    disabled. Fix this by calling writel() with the offset for the proper
    register.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Dmitry Torokhov

    Tobias Klauser
     
  • Expression haptic->pwm_dev->period * haptic->magnitude is of type
    'unsigned int' and may overflow. We need to convert one of the operands
    to u64 before multiplying, instead of casting result (potentially
    overflown) to u64.

    Reported by Coverity: CID 1248753

    Acked-by : Jaewon Kim
    Reviewed-by: Chanwoo Choi
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

29 Oct, 2014

4 commits


25 Oct, 2014

4 commits


20 Oct, 2014

1 commit

  • Pull second round of input updates from Dmitry Torokhov:
    "Mostly simple bug fixes, although we do have one brand new driver for
    Microchip AR1021 i2c touchscreen.

    Also there is the change to stop trying to use i8042 active
    multiplexing by default (it is still possible to activate it via
    i8042.nomux=0 on boxes that implement it)"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: xpad - add Thrustmaster as Xbox 360 controller vendor
    Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing Wheel
    Input: max77693-haptic - fix state check in imax77693_haptic_disable()
    Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
    Input: alps - fix v4 button press recognition
    Input: i8042 - disable active multiplexing by default
    Input: i8042 - add noloop quirk for Asus X750LN
    Input: synaptics - gate forcepad support by DMI check
    Input: Add Microchip AR1021 i2c touchscreen
    Input: cros_ec_keyb - add of match table
    Input: serio - avoid negative serio device numbers
    Input: avoid negative input device numbers
    Input: automatically set EV_ABS bit in input_set_abs_params
    Input: adp5588-keys - cancel workqueue in failure path
    Input: opencores-kbd - switch to using managed resources
    Input: evdev - fix EVIOCG{type} ioctl

    Linus Torvalds
     

17 Oct, 2014

4 commits


16 Oct, 2014

1 commit

  • Since the change to struct input_mt_pos some variables are now bitfields
    instead of integers. Automatic conversion from integer to bitfield entry
    destroys information, therefore enforce boolean interpretation instead.

    Link: https://bugzilla.redhat.com/show_bug.cgi?id=1114768
    Fixes: 02d04254a5df ("Input: alps - use struct input_mt_pos to track coordinates")
    Signed-off-by: Andreas Bosch
    Signed-off-by: Dmitry Torokhov

    Andreas Bosch