1
0
Fork 0
Commit Graph

68 Commits (c6cfaf4f86d9d15e5541adb3bb899d0b80f89ec7)

Author SHA1 Message Date
Dmitry Torokhov 2e75cfaa32 Input: elan_i2c - switch to using devm_add_action_or_reset()
Instead of manually disabling regulators when devm_add_action() fails we can
use devm_add_action_or_reset() which does it for us.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-07-24 12:58:52 +03:00
Dmitry Torokhov 9609b904c7 Input: elan_i2c - switch to using devm_device_add_groups()
Instead of installing custom devm cleanup action to remove attribute
groups on failure, let's use the dedicated devm API.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-07-24 12:58:52 +03:00
Dmitry Torokhov ecb41832bd Linux 5.2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl0idTweHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGZesIAJDKicw2Voyx8K8m
 3pXSK+71RuO/d3Y9M51mdfTMKRP4PHR9/4wVZ9wHPwC4dV6wxgsmIYCF69a1Wety
 LD1MpDCP1DK5wVfPNKVX2xmj7ua6iutPtSsJHzdzM2TlscgsrFKjmUccqJ5JLwL5
 c34nqwXWnzzRyI5Ga9cQSlwzAXq0vDHXyML3AnCosSsLX0lKFrHlK1zttdOPNkfj
 dXRN62g3q+9kVQozzhDXb8atZZ7IkBk8Q0lujpNXW83Ci1VjaVNv3SB8GZTXIlLj
 U15VdyuwfJDfpBgFBN6/unzVaAB6FFrEKy0jT1aeTyKarMKDKgOnJjn10aKjDNno
 /bXsKKc=
 =TVqV
 -----END PGP SIGNATURE-----

Merge tag 'v5.2' into next

Sync up with mainline to resolve conflicts in iforce driver.
2019-07-15 09:42:32 -07:00
Jeffrey Hugo 0828c10013 Input: elan_i2c - export the device id whitelist
Elan_i2c and hid-quirks work in conjunction to decide which devices each
driver will handle.  Elan_i2c has a whitelist of devices that should be
consumed by hid-quirks so that there is one master list of devices to
handoff between the drivers.  Put the ids in a header file so that
hid-quirks can consume it instead of duplicating the list.

Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-30 00:18:13 -07:00
Linus Torvalds c884d8ac7f SPDX update for 5.2-rc6
Another round of SPDX updates for 5.2-rc6
 
 Here is what I am guessing is going to be the last "big" SPDX update for
 5.2.  It contains all of the remaining GPLv2 and GPLv2+ updates that
 were "easy" to determine by pattern matching.  The ones after this are
 going to be a bit more difficult and the people on the spdx list will be
 discussing them on a case-by-case basis now.
 
 Another 5000+ files are fixed up, so our overall totals are:
 	Files checked:            64545
 	Files with SPDX:          45529
 
 Compared to the 5.1 kernel which was:
 	Files checked:            63848
 	Files with SPDX:          22576
 This is a huge improvement.
 
 Also, we deleted another 20000 lines of boilerplate license crud, always
 nice to see in a diffstat.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXQyQYA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymnGQCghETUBotn1p3hTjY56VEs6dGzpHMAnRT0m+lv
 kbsjBGEJpLbMRB2krnaU
 =RMcT
 -----END PGP SIGNATURE-----

Merge tag 'spdx-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull still more SPDX updates from Greg KH:
 "Another round of SPDX updates for 5.2-rc6

  Here is what I am guessing is going to be the last "big" SPDX update
  for 5.2. It contains all of the remaining GPLv2 and GPLv2+ updates
  that were "easy" to determine by pattern matching. The ones after this
  are going to be a bit more difficult and the people on the spdx list
  will be discussing them on a case-by-case basis now.

  Another 5000+ files are fixed up, so our overall totals are:
	Files checked:            64545
	Files with SPDX:          45529

  Compared to the 5.1 kernel which was:
	Files checked:            63848
	Files with SPDX:          22576

  This is a huge improvement.

  Also, we deleted another 20000 lines of boilerplate license crud,
  always nice to see in a diffstat"

* tag 'spdx-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (65 commits)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 507
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 506
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 503
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 502
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 498
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 497
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 496
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 495
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 491
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 490
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 489
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 488
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 487
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 486
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 485
  ...
2019-06-21 09:58:42 -07:00
Thomas Gleixner d2912cb15b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-19 17:09:55 +02:00
Benjamin Tissoires 140a79523e Input: elan_i2c - handle physical middle button
Some models have a middle button, we should export it as well.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:46 -07:00
Benjamin Tissoires e3a9a12906 Input: elan_i2c - do not query the info if they are provided
See the previous patch for a long explanation.

TL;DR: the P52 and the t480s from Lenovo can't rely on I2C to fetch
the information, so we need it from PS/2.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-27 18:50:44 -07:00
Ravi Chandra Sadineni 145b11d1ba Input: elan_i2c - increment wakeup count if wake source
Notify the PM core that this device is the wake source. This helps
userspace daemon tracking the wake sources to identify the origin of the
wake.

Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-15 16:25:12 -07:00
KT Liao 738c06d0e4 Input: elan_i2c - add hardware ID for multiple Lenovo laptops
There are many Lenovo laptops which need elan_i2c support, this patch adds
relevant IDs to the Elan driver so that touchpads are recognized.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-03-26 17:34:06 -07:00
Vincent Batts e154ab6932 Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
Lenovo s21e-20 uses ELAN0601 in its ACPI tables for the Elan touchpad.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-03-09 15:57:17 -08:00
Mauro Ciancio 7ad222b3ae Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK
This adds ELAN0617 to the ACPI table to support Elan touchpad found in
Lenovo V330-15ISK.

Signed-off-by: Mauro Ciancio <mauro@acadeu.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-16 22:49:46 -08:00
Dmitry Torokhov f420c54e4b Revert "Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G"
This reverts commit 7db54c89f0 as it
breaks Acer Aspire V-371 and other devices. According to Elan:

"Acer Aspire F5-573G is MS Precision touchpad which should use hid
 multitouch driver. ELAN0501 should not be added in elan_i2c."

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202503
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-02-11 14:33:05 -08:00
Patrick Dreyer 7db54c89f0 Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G
This adds ELAN0501 to the ACPI table to support Elan touchpad found in ASUS
Aspire F5-573G.

Signed-off-by: Patrick Dreyer <Patrick.Dreyer@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-12-28 17:10:15 -08:00
Noah Westervelt ad33429cd0 Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR
Add ELAN061E to the ACPI table to support Elan touchpad found in Lenovo
IdeaPad 330-15ARR.

Signed-off-by: Noah Westervelt <nwestervelt@outlook.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-12-03 11:37:16 -08:00
Adam Wong bf87ade0dd Input: elan_i2c - add support for ELAN0621 touchpad
Added the ability to detect the ELAN0621 touchpad found in some Lenovo
laptops.

Signed-off-by: Adam Wong <adam@adamwong.me>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-12-03 11:37:15 -08:00
Patrick Gaskin 3ed64da3b7 Input: elan_i2c - add ELAN0620 to the ACPI table
Add ELAN0620 to the ACPI table to support the elan touchpad in
the Lenovo IdeaPad 130-15IKB.

Signed-off-by: Patrick Gaskin <patrick@pgaskin.net>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-11-12 11:52:03 -08:00
Mikhail Nikiforov 13c1c5e4d7 Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15IGM
Add ELAN061C to the ACPI table to support Elan touchpad found in Lenovo
IdeaPad 330-15IGM.

Signed-off-by: Mikhail Nikiforov <jackxviichaos@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-10-15 11:24:45 -07:00
KT Liao 6f88a6439d Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST
Add ELAN0622 to ACPI mapping table to support Elan touchpad found in
Ideapad 330-15AST.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Reported-by: Anant Shende <anantshende@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-16 12:14:48 +00:00
Donald Shanty III 938f45008d Input: elan_i2c - add ACPI ID for lenovo ideapad 330
This allows Elan driver to bind to the touchpad found in Lenovo Ideapad 330
series laptops.

Signed-off-by: Donald Shanty III <dshanty@protonmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-07-04 15:58:47 +00:00
Ben Hutchings 50fc7b6195 Input: elan_i2c_smbus - fix more potential stack buffer overflows
Commit 40f7090bb1 ("Input: elan_i2c_smbus - fix corrupted stack")
fixed most of the functions using i2c_smbus_read_block_data() to
allocate a buffer with the maximum block size.  However three
functions were left unchanged:

* In elan_smbus_initialize(), increase the buffer size in the same
  way.
* In elan_smbus_calibrate_result(), the buffer is provided by the
  caller (calibrate_store()), so introduce a bounce buffer.  Also
  name the result buffer size.
* In elan_smbus_get_report(), the buffer is provided by the caller
  but happens to be the right length.  Add a compile-time assertion
  to ensure this remains the case.

Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-06-21 17:20:41 -07:00
Alexandr Savca 8938fc7b8f Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
Add ELAN0618 to the list of supported touchpads; this ID is used in
Lenovo v330 15IKB devices.

Signed-off-by: Alexandr Savca <alexandr.savca@saltedge.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-06-21 17:20:41 -07:00
Johannes Wienke e6e7e9cd8e Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID
Add ELAN0612 to the list of supported touchpads; this ID is used in Lenovo
v330 14IKB devices.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199253
Signed-off-by: Johannes Wienke <languitar@semipol.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-06-04 13:41:49 -07:00
Benjamin Tissoires 559b3df76f Input: elan_i2c - add trackstick report
The Elan touchpads over I2C/SMBus also can handle a trackstick.
Unfortunately, nothing tells us if the device supports trackstick (the
information lies in the PS/2 node), so rely on device properties to
determine whether to enable the trackstick node.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=1313939

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: KT Liao <kt.liao@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-05-23 16:46:36 -07:00
Dmitry Torokhov 10a558374f Linux 4.15
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJabj6pAAoJEHm+PkMAQRiGs8cIAJQFkCWnbz86e3vG4DuWhyA8
 CMGHCQdUOxxFGa/ixhIiuetbC0x+JVHAjV2FwVYbAQfaZB3pfw2iR1ncQxpAP1AI
 oLU9vBEqTmwKMPc9CM5rRfnLFWpGcGwUNzgPdxD5yYqGDtcM8K840mF6NdkYe5AN
 xU8rv1wlcFPF4A5pvHCH0pvVmK4VxlVFk/2H67TFdxBs4PyJOnSBnf+bcGWgsKO6
 hC8XIVtcKCH2GfFxt5d0Vgc5QXJEpX1zn2mtCa1MwYRjN2plgYfD84ha0xE7J0B0
 oqV/wnjKXDsmrgVpncr3txd4+zKJFNkdNRE4eLAIupHo2XHTG4HvDJ5dBY2NhGU=
 =sOml
 -----END PGP SIGNATURE-----

Merge tag 'v4.15' into next

Sync with mainline to get in trackpoint updates and other changes.
2018-02-01 00:41:33 -08:00
Greg Kroah-Hartman 98c6a3aa41 Input: elan_i2c - remove unneeded MODULE_VERSION() usage
MODULE_VERSION is useless for in-kernel drivers, so just remove all
usage of it in the elan_i2c mouse driver.  Now that this is gone, the
ELAN_DRIVER_VERSION define was also removed as it was pointless.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-16 16:48:22 -08:00
Dmitry Torokhov c25141062a Merge branch 'next' into for-linus
Prepare input updates for 4.15 merge window.
2017-11-13 17:10:13 -08:00
Dmitry Torokhov 0f1cd81d4a Linux 4.14-rc8
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJZ/30WAAoJEHm+PkMAQRiG1YkIAIVgcZS9SPzjcH+/NpcNJ4wv
 Bp8xyfj/X6Eswn63ebrV/qij65Esmha7wnSREcFqrfNecRwOAdvYCjj20jqKGws2
 p03sOS4aVSpJSQcqJ9sdF3Xx/P7CcK4IAjr0ihQbqozXiZAgVzTlYJwB+ErBMWFU
 6NFYXg/Xp7FJXJ0o14yHpZ4RqgbLV95CgFIG9hzwvCibsW6ZBvGtYBD99IjeojPg
 rw+B+Osck7XjC6IHqF/u760nTOaP8vVlTrCRqvFityGS9ZFQZDzEKYqxYgk8cVFC
 jzR3fuHiWiomhyP9dLUZn6UuYQTaThhY58LvsEwV0JVJH9mUwcA4u5nO0wDUCO4=
 =hhQa
 -----END PGP SIGNATURE-----

Merge tag 'v4.14-rc8' into next

Merge with mainline to bring in SPDX markings to avoid annoying merge
problems when some header files get deleted.
2017-11-07 18:11:56 -08:00
Kai-Heng Feng cdea6a30c2 Input: elan_i2c - add ELAN060C to the ACPI table
ELAN060C touchpad uses elan_i2c as its driver. It can be
found on Lenovo ideapad 320-14AST.

BugLink: https://bugs.launchpad.net/bugs/1727544
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-07 17:44:40 -08:00
Kai-Heng Feng 57a95b4186 Input: elan_i2c - add ELAN0611 to the ACPI table
ELAN0611 touchpad uses elan_i2c as its driver. It can be found
on Lenovo ideapad 320-15IKB.

So add it to ACPI table to enable the touchpad.

[Ido Adiv <idoad123@gmail.com> reports that the same ACPI ID is used for
Elan touchpad in ideapad 520].

BugLink: https://bugs.launchpad.net/bugs/1723736
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-24 11:54:08 -07:00
Dmitry Torokhov a4b0a58bb1 Input: elan_i2c - do not clobber interrupt trigger on x86
On x86 we historically used falling edge interrupts in the driver
because that's how first Chrome devices were configured. They also
did not use ACPI to enumerate I2C devices (because back then there
was no kernel support for that), so trigger was hard-coded in the
driver. However the controller behavior is much more reliable if
we use level triggers, and that is how we configured ARM devices,
and how want to configure newer x86 devices as well. All newer
x86 boxes have their I2C devices enumerated in ACPI.

Let's see if platform code (ACPI, DT) described interrupt and
specified particular trigger type, and if so, let's use it instead
of always clobbering trigger with IRQF_TRIGGER_FALLING. We will
still use this trigger type as a fallback if platform code left
interrupt trigger unconfigured.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196761
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29 16:51:01 -07:00
Nik Nyby 7ed802c0c0 Input: elan_i2c - remove duplicate ELAN0605 id
ELAN0605 appears twice here.

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-21 16:42:23 -07:00
Dmitry Torokhov 95a0c7c2d6 Immutable branch between MFD and many other subsystems due for the v4.14 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJZrVgvAAoJEFGvii+H/Hdhw9AP/04kewyz1WwobD+0SZsujELP
 768c92WNmMqux8OsRVUpjqcCsepi+W8ppM2tmV9jJ+rwb9SeT+cOxnaUPrlHMuK+
 zQyc4F4PRlyxfrFZ0tr/VrTHvhsmdmhEux34zMrdKggeShwHAkEQhNUFTEo3efKs
 J32H2BuDTcbnbiqz1Lg00NzIFOEhvpSsplgUQtz7NnG1y8T9U0kLupoXkNquIAj9
 SAP9LTNyUlPqlQ0Ku0S77Zr8R9K202T9xi1RGGoscYiM3421WJA/+4S9RTqfAVje
 atAOfS+nNnaxkeBYJT/wZ71zINdbhj0NKsGa/aah4hGIpbvuwouWPy+8PqyugKYy
 M6uBpjo1uk1gu+kYruzNXYmKLH+F8W8bTMNiovJ2bx4qP08FlB/4X+BCL9Hy00/Z
 btOz1cBTEjY2aUND84b2qZLkmGbH4VTGFS3TAr0TqsM2hQH8ThxP2f+tM7Hseupl
 SvaahUYXiqTNexErLQD/Oya6QKZgoJvUmboGGO65BQmdXeHXoA3hZBltp7+aEBb4
 IYG3eWwY5Shj3jpB16jDAioC43B4hHiLUWDGJtquFuscXJr5WkfeKMBg7PrY46Rh
 reHsYAMhLVmOUBe77NyAEyVjQcBtpHlpkETvsCjM3tP/GqWlHLR+1jhech3Ip3LA
 X7ODA7pC9iGSY2ePTiCj
 =nb+l
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-many-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next

Merge "Immutable branch between MFD and many other subsystems due for
the v4.14 merge window" to get the TWL headers moved to the right place.
2017-09-21 16:38:09 -07:00
Dmitry Torokhov a6cbfa1e6d Merge branch 'next' into for-linus
Prepare input updates for 4.14 merge window.
2017-09-04 09:22:54 -07:00
KT Liao 991368818d Input: elan_i2c - support touchpads with two physical buttons
Elan touchpads on Asus ROG G752xx series laptops have 2 physical buttons.
Luckily we can query the touchpad to see if it is a clickpad variant and
adjust the behavior accordingly.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Tested-by: Maxime Bellengé <maxime.bellenge@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-18 17:07:02 -07:00
KT Liao 1d2226e450 Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310
Add ELAN0602 to the list of known ACPI IDs to enable support for ELAN
touchpads found in Lenovo Yoga310.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-18 17:03:57 -07:00
KT Liao 7698869040 Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB
Add 2 new IDs (ELAN0609 and ELAN060B) to the list of ACPI IDs that should
be handled by the driver.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-14 20:22:11 -07:00
Kai-Heng Feng 1874064eed Input: elan_i2c - add ELAN0608 to the ACPI table
Similar to commit 722c5ac708 ("Input: elan_i2c - add ELAN0605 to the
ACPI table"), ELAN0608 should be handled by elan_i2c.

This touchpad can be found in Lenovo ideapad 320-14IKB.

BugLink: https://bugs.launchpad.net/bugs/1708852

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-08-14 20:22:02 -07:00
KT Liao a2eaf299d1 Input: elan_i2c - add support for fetching chip type on newer hardware
Newer Elantech hardware requires different way of fetching chip type and
version data.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-11 17:44:23 -07:00
Dmitry Torokhov c5928551fd Input: elan_i2c - check if device is there before really probing
Before trying to properly initialize the touchpad and generate bunch of
errors, let's first see it there is anything at the given address. If we
get error, fail silently with -ENXIO.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-11 17:41:53 -07:00
Matjaz Hegedic 92ef6f97a6 Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
EeeBook X205TA is yet another ASUS device with a special touchpad
firmware that needs to be accounted for during initialization, or
else the touchpad will go into an invalid state upon suspend/resume.
Adding the appropriate ic_type and product_id check fixes the problem.

Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com>
Acked-by: KT Liao <kt.liao@emc.com.tw>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-03-10 14:37:19 -08:00
Dmitry Torokhov 6e11617fcf Merge branch 'next' into for-linus
Prepare input updates for 4.11 merge window.
2017-02-20 15:16:02 -08:00
IHARA Hiroka 722c5ac708 Input: elan_i2c - add ELAN0605 to the ACPI table
ELAN0605 has been confirmed to be a variant of ELAN0600, which is
blacklisted in the hid-core to be managed by elan_i2c. This device can be
found in Lenovo ideapad 310s (80U4000).

Signed-off-by: Hiroka IHARA <ihara_h@live.jp>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-12 18:36:49 -08:00
Guenter Roeck ad56814fcc Input: mouse - use local variables consistently
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>
2017-01-21 23:52:22 -08:00
Benjamin Tissoires 39a0d75ae3 Input: elan_i2c - always output the device information
it's always easier to retrieve these information in bug reports when
it is always printed in the dmesg.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-10-26 16:48:15 -07:00
KT Liao 2de4fcc646 Input: elan_i2c - properly wake up touchpad on ASUS laptops
Some ASUS laptops were shipped with touchpads that require to be woken up
first, before trying to switch them into absolute reporting mode, otherwise
touchpad would fail to work while flooding the logs with:

	elan_i2c i2c-ELAN1000:00: invalid report id data (1)

Among affected devices are Asus E202SA, N552VW, X456UF, UX305CA, and
others. We detect such devices by checking the IC type and product ID
numbers and adjusting order of operations accordingly.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Reported-by: Chris Chiu <chiu@endlessm.com>
Reported-by: Vlad Glagolev <stealth@vaygr.net>
Tested-by: Vlad Glagolev <stealth@vaygr.net>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-02 23:40:40 -07:00
Charlie Mooney 3eab4588c9 Input: elan_i2c - set input device's vendor and product IDs
Previously the "vendor" and "product" IDs for the elan_i2c driver simply
reported 0000.  This patch modifies the elan_i2c driver to include the
Elan vendor ID and the touchpad's product id under
input/input*/{vendor,product}.

Specifically, this is to allow us to apply a generic Elan gestures config
that will apply to all Elan touchpads on ChromeOS.  These configs  match to
input devices in various ways, but one major way is by matching on vendor
ID.  Adding this patch allows the default Elan touchpad config to be
applied to Elan touchpads in this kernel by matching on devices that have
vendor ID 04f3.

Note that product ID is also available via custom sysfs entry "product_id"
as well.

Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-15 11:35:55 -08:00
duson 22ef28b43f Input: elan_i2c - add all valid ic type for i2c/smbus
Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-28 17:18:54 -07:00
Duson Lin ed75a14eb5 Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
In order to support more projects in the future, we expand the
maximum product_id value form 0xFF to 0xFFFF.

Signed-off by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-21 09:32:40 -07:00
Duson Lin c84333a1c5 Input: elan_i2c - add ic type 0x03
The 0x03 is valid 3000 serial ic type too.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-21 09:32:40 -07:00