Commits on Nov 27, 2017
  1. Input: elantech - add new icbody type 15

    Aaron Ma authored and dtor committed Nov 26, 2017
    The touchpad of Lenovo Thinkpad L480 reports it's version as 15.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Sep 11, 2017
  1. Input: elantech - make arrays debounce_packet static, reduces object …

    ColinIanKing authored and dtor committed Sep 7, 2017
    …code size
    
    Don't populate the arrays debounce_packet on the stack, instead make
    them static.  Makes the object code smaller by over 870 bytes:
    
    Before:
       text	   data	    bss	    dec	    hex	filename
      30553	   9152	      0	  39705	   9b19	drivers/input/mouse/elantech.o
    
    After:
       text	   data	    bss	    dec	    hex	filename
      29521	   9312	      0	  38833	   97b1	drivers/input/mouse/elantech.o
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jul 24, 2017
  1. Merge branch 'bind_unbind' of git://git.kernel.org/pub/scm/linux/kern…

    dtor committed Jul 24, 2017
    …el/git/gregkh/driver-core into next
    
    This brings in devm_device_add_group() and friends so that we can create
    driver-specific device attributes as managed resources.
Commits on Jul 12, 2017
  1. Input: elantech - constify attribute_group structures

    ArvindYadavCs authored and dtor committed Jul 11, 2017
    attribute_groups are not supposed to change at runtime. All functions
    working with attribute_groups provided by <linux/sysfs.h> work with const
    attribute_group. So mark the non-const structs as const.
    
    File size before:
       text	   data	    bss	    dec	    hex	filename
      16815	   1424	      0	  18239	   473f	drivers/input/mouse/elantech.o
    
    File size After adding 'const':
       text	   data	    bss	    dec	    hex	filename
      16879	   1360	      0	  18239	   473f	drivers/input/mouse/elantech.o
    
    Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jun 7, 2017
  1. Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled

    ulrikdb authored and dtor committed Jun 7, 2017
    The Lifebook E546 and E557 touchpad were also not functioning and
    worked after running:
    
            echo "1" > /sys/devices/platform/i8042/serio2/crc_enabled
    
    Add them to the list of machines that need this workaround.
    
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Reviewed-by: Arjan Opmeer <arjan@opmeer.net>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on May 30, 2017
  1. Merge tag 'v4.12-rc3' into next

    dtor committed May 30, 2017
    Sync with mainline to bring in changes in platform drovers dropping
    calls to sparse_keymap_free() so that we can remove it for good.
Commits on May 12, 2017
  1. Input: elantech - force relative mode on a certain module

    KT Liao authored and dtor committed Dec 12, 2016
    One of Elan modules with sample version is 0x74 and hw_version is 0x03 has
    a bug in absolute mode implementation, so let it run in default PS/2
    relative mode.
    
    Signed-off-by: KT Liao <kt.liao@emc.com.tw>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Apr 18, 2017
  1. Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled

    knurd authored and dtor committed Apr 18, 2017
    Temporary got a Lifebook E547 into my hands and noticed the touchpad
    only works after running:
    
    	echo "1" > /sys/devices/platform/i8042/serio2/crc_enabled
    
    Add it to the list of machines that need this workaround.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info>
    Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jan 22, 2017
  1. Input: mouse - use local variables consistently

    groeck authored and dtor committed Jan 22, 2017
    If a function declares a variable to access a structure element,
    use it consistently.
    
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Oct 7, 2016
  1. Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled

    dtor committed Oct 6, 2016
    Another Lifebook machine that needs the same quirk as other similar
    models to make the driver working.
    
    Also let's reorder elantech_dmi_force_crc_enabled list so LIfebook enries
    are in alphabetical order.
    
    Reported-by: William Linna <william.linna@gmail.com>
    Tested-by: William Linna <william.linna@gmail.com>
    Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Oct 4, 2016
  1. Input: elantech - force needed quirks on Fujitsu H760

    Matti Kurkela authored and dtor committed Oct 3, 2016
    Just like Fujitsu CELSIUS H730, the H760 also has an Elantech touchpad with
    the same quirks. Without this patch, the touchpad is useless out-of-the-box
    as the mouse pointer won't move.
    
    This patch makes the driver aware of both the crc_enabled=1 requirement and
    the middle button, making the touchpad fully functional out-of-the-box.
    
    Signed-off-by: Matti Kurkela <Matti.Kurkela@iki.fi>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  2. Input: elantech - fix Lenovo version typo

    marcosps authored and dtor committed Oct 3, 2016
    Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
    Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Aug 3, 2016
  1. Input: elantech - fix debug dump of the current packet

    Benjamin Tissoires authored and dtor committed Jul 28, 2016
    The use of mixed psmouse_printk() and printk creates 2 lines in the log,
    while the use of %*ph solves everything.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jul 19, 2016
  1. Merge branch 'for-linus' into next

    dtor committed Jul 19, 2016
    Sync up to bring in wacom_w8001 changes to avoid merge conflicts later.
Commits on Jun 23, 2016
  1. Input: elantech - add more IC body types to the list

    dtor committed Jun 21, 2016
    The touchpad in HP Pavilion 14-ab057ca reports it's version as 12 and
    according to Elan both 11 and 12 are valid IC types and should be
    identified as hw_version 4.
    
    Reported-by: Patrick Lessard <Patrick.Lessard@cogeco.com>
    Tested-by: Patrick Lessard <Patrick.Lessard@cogeco.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jun 19, 2016
  1. Input: psmouse - use same format for secondary devices as for primary

    pali authored and dtor committed Jun 18, 2016
    This patch changes name of secondary psmouse devices to mach format of
    primary device. Format of primary device is "protocol vendor name" and is
    set by function psmouse_switch_protocol() in file psmouse-base.c.
    
    Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jan 12, 2016
  1. Input: elantech - mark protocols v2 and v3 as semi-mt

    Benjamin Tissoires authored and dtor committed Jan 12, 2016
    When using a protocol v2 or v3 hardware, elantech uses the function
    elantech_report_semi_mt_data() to report data. This devices are rather
    creepy because if num_finger is 3, (x2,y2) is (0,0). Yes, only one valid
    touch is reported.
    
    Anyway, userspace (libinput) is now confused by these (0,0) touches,
    and detect them as palm, and rejects them.
    
    Commit 3c0213d ("Input: elantech - fix semi-mt protocol for v3 HW")
    was sufficient enough for xf86-input-synaptics and libinput before it has
    palm rejection. Now we need to actually tell libinput that this device is
    a semi-mt one and it should not rely on the actual values of the 2 touches.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Nov 6, 2015
  1. Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled

    tiwai authored and dtor committed Nov 6, 2015
    Another Lifebook machine that needs the same quirk as other similar
    models to make the driver working.
    
    Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=883192
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Aug 7, 2015
  1. Input: elantech - add special check for fw_version 0x470f01 touchpad

    dusonlin authored and dtor committed Aug 7, 2015
    It is no need to check the packet[0] for sanity check when doing
    elantech_packet_check_v4() function for fw_version = 0x470f01 touchpad.
    
    Signed-off by: Duson Lin <dusonlin@emc.com.tw>
    Reviewed-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jul 16, 2015
  1. Input: elantech - force resolution of 31 u/mm

    whot authored and dtor committed Jul 16, 2015
    All Elantech touchpads pre-v4 with dynamic resolution queries have a fixed
    resolution of 800dpi -> 31.49 units/mm. Set this statically, so userspace
    does not have to guess.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jun 5, 2015
  1. Input: elantech - add new icbody type

    洪一竹 authored and dtor committed Jun 5, 2015
    This adds new icbody type to the list recognized by Elantech PS/2 driver.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Sam Hung <sam.hung@emc.com.tw>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jun 2, 2015
  1. Input: elantech - fix detection of touchpads where the revision match…

    jwrdegoede authored and dtor committed Jun 2, 2015
    …es a known rate
    
    Make the check to skip the rate check more lax, so that it applies
    to all hw_version 4 models.
    
    This fixes the touchpad not being detected properly on Asus PU551LA
    laptops.
    
    Cc: stable@vger.kernel.org
    Reported-and-tested-by: David Zafra Gómez <dezeta@klo.es>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on May 13, 2015
  1. Input: elantech - fix semi-mt protocol for v3 HW

    Benjamin Tissoires authored and dtor committed Apr 23, 2015
    When the v3 hardware sees more than one finger, it uses the semi-mt
    protocol to report the touches. However, it currently works when
    num_fingers is 0, 1 or 2, but when it is 3 and above, it sends only 1
    finger as if num_fingers was 1.
    
    This confuses userspace which knows how to deal with extra fingers
    when all the slots are used, but not when some are missing.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90101
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Apr 6, 2015
  1. Input: elantech - fix absolute mode setting on some ASUS laptops

    ulrikdb authored and dtor committed Apr 6, 2015
    On ASUS TP500LN and X750JN, the touchpad absolute mode is reset each
    time set_rate is done.
    
    In order to fix this, we will verify the firmware version, and if it
    matches the one in those laptops, the set_rate function is overloaded
    with a function elantech_set_rate_restore_reg_07 that performs the
    set_rate with the original function, followed by a restore of reg_07
    (the register that sets the absolute mode on elantech v4 hardware).
    
    Also the ASUS TP500LN and X750JN firmware version, capabilities, and
    button constellation is added to elantech.c
    
    Cc: stable@vger.kernel.org
    Reported-and-tested-by: George Moutsopoulos <gmoutso@yahoo.co.uk>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Feb 1, 2015
  1. Input: elantech - add more Fujtisu notebooks to force crc_enabled

    Rainer Koenig authored and dtor committed Jan 27, 2015
    Add two more Fujitsu LIFEBOOK models that also ship with the Elantech
    touchpad and don't work with crc_disabled to the quirk list.
    
    Signed-off-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Jan 8, 2015
  1. Input: elantech - support new ICs types for version 4

    Sam hung authored and dtor committed Jan 8, 2015
    This change allows the driver to recognize newer Elantech touchpads.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Yi ju Hong <sam.hung@emc.com.tw>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Nov 25, 2014
  1. Input: elantech - trust firmware about trackpoint presence

    dtor committed Nov 20, 2014
    Only try to parse data as coming from trackpoint if firmware told us that
    trackpoint is present.
    
    Fixes commit caeb0d3
    
    Reported-and-tested-by: Marcus Overhagen <marcus.overhagen@gmail.com>
    Reported-and-tested-by: Anders Kaseorg <andersk@mit.edu>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Nov 14, 2014
  1. Input: elantech - provide a sysfs knob for crc_enabled

    ulrikdb authored and dtor committed Nov 14, 2014
    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 <stefan@valouch.com>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  2. Input: elantech - report the middle button of the touchpad

    ulrikdb authored and dtor committed Nov 14, 2014
    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 <stefan@valouch.com>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Nov 8, 2014
  1. Input: elantech - fix crc_enabled for Fujitsu H730

    ulrikdb authored and dtor committed Nov 8, 2014
    The Fujitsu H730 does not work with crc_enabled = 0, even though the
    crc_enabled bit in the firmware version indicated it would. When switching
    this value to crc_enabled to 1, the touchpad works. This patch uses DMI to
    detect H730.
    
    Reported-by: Stefan Valouch <stefan@valouch.com>
    Tested-by: Stefan Valouch <stefan@valouch.com>
    Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  2. Input: elantech - use elantech_report_trackpoint for hardware v4 too

    ulrikdb authored and dtor committed Nov 8, 2014
    The Fujitsu H730 has hardware v4 with a trackpoint. This enables the
    elantech_report_trackpoint for v4.
    
    Reported-by: Stefan Valouch <stefan@valouch.com>
    Tested-by: Stefan Valouch <stefan@valouch.com>
    Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Sep 8, 2014
  1. Input: add missing POINTER / DIRECT properties to a bunch of drivers

    jwrdegoede authored and dtor committed Sep 8, 2014
    I've not done a full audit of all mouse drivers, I noticed these ones were
    missing the POINTER property while working on the POINTING_STICK property.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  2. Input: add INPUT_PROP_POINTING_STICK property

    jwrdegoede authored and dtor committed Sep 8, 2014
    It is useful for userspace to know that there not dealing with a regular
    mouse but rather with a pointing stick (e.g. a trackpoint) so that
    userspace can e.g. automatically enable middle button scrollwheel
    emulation.
    
    It is impossible to tell the difference from the evdev info without
    resorting to putting a list of device / driver names in userspace, this is
    undesirable.
    
    Add a property which allows userspace to see if a device is a pointing
    stick, and set it on all the pointing stick drivers.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  3. Input: elantech - fix detection of touchpad on ASUS s301l

    jwrdegoede authored and dtor committed Sep 8, 2014
    Adjust Elantech signature validation to account fo rnewer models of
    touchpads.
    
    Cc: stable@vger.kernel.org
    Reported-and-tested-by: Màrius Monton <marius.monton@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Commits on Aug 26, 2014
  1. Input: elantech - add support for trackpoint found on some v3 models

    ulrikdb authored and dtor committed Aug 23, 2014
    Some elantech v3 touchpad equipped laptops also have a trackpoint, before
    this commit, these give sync errors. With this patch, the trackpoint is
    provided as another input device: 'Elantech PS/2 TrackPoint'
    
    The patch will also output messages that do not follow the expected pattern.
    In the mean time I've seen 2 unknown packets occasionally:
    0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
    0x00 , 0x00 , 0x00 , 0x02 , 0x00 , 0x00
    I don't know what those are for, but they can be safely ignored.
    
    Currently all packets that are not known to v3 touchpad and where
    packet[3] (the fourth byte) lowest nibble is 6 are now recognized as
    PACKET_TRACKPOINT and processed by the new elantech_report_trackpoint.
    
    This has been verified to work on a laptop Lenovo L530 where the
    touchpad/trackpoint combined identify themselves as:
    psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02)
    psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c.
    
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>