Commit graph

818 commits

Author SHA1 Message Date
Dmitry Torokhov 23ea5967d6 Merge branch 'next' into for-linus
Prepare first round of input updates for 4.7 merge window.
2016-05-16 17:25:08 -07:00
Chris Diamand 82aaa08601 Input: byd - update copyright header
As pointed out by Richard, the changes to the comment got missed off
the absolute mode patch somehow.

Signed-off-by: Chris Diamand <chris@diamand.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-05-09 09:33:31 -07:00
Vladimir Zapolskiy 5ad629a82d Input: byd - don't wipe dynamically allocated memory twice
Since memory for a private data is allocated by kzalloc() there is no
need to fill it with zeroes immediately after the allocation.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-04-29 13:59:01 -07:00
Benjamin Tissoires 82be788c96 Input: synaptics - handle spurious release of trackstick buttons, again
Looks like the fimware 8.2 still has the extra buttons spurious release
bug.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=114321
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 17:15:57 -07:00
Richard Pospesel 2d5f5611dd Input: byd - enable absolute mode
The Windows driver's settings dialog contains a visualization of the
regions for the hardware edge scrolling capability, which uses a
temporarily-enabled limited-resolution absolute mode.

This patch enables this during normal operation, and combines the
absolute packets with the existing relative packets to provide
accurate absolute position and touch reporting.

It also adds documentation for all known gesture packets and
initialization commands.

Reviewed-by: Chris Diamand <chris@diamand.org>
Signed-off-by: Richard Pospesel <pospeselr@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-17 17:04:54 -07:00
Dmitry Torokhov 245f0db0de Linux 4.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJW5j4RAAoJEHm+PkMAQRiGhVEH/0qZbM1J+WnCK92bm9+inCnB
 JO2JViGIuCQB5BxljVMil2dzrw85D+dC7+fryr0wVBhhBlr0lXPJGSYCYYTEaI20
 Wco5YlTmjRirUwmxWzBXvB5kvTdIaNfNYDcFch6lbsaLUNgqydNKtk08ckO/4k0D
 AmaShW8swBiXE/RmHuj8H41ksHsnY8W62dlczEaAIfr4kluPX/kKnyXpmpvmZm1j
 sM4fskPlq+Jz5pOXXFsFfrhiBgpSUnwSj1tNwK5+DkmaVnWOkPuwkqLBWqpy4pzm
 GTeDBdf5/ixGxgNsZ2VWtbPnc2wEP7SIcu45MU7QFw5kqwDN2nN63BRVXI5Z5qY=
 =RFx2
 -----END PGP SIGNATURE-----

Merge tag 'v4.5' into next

Merge with Linux 4.5 to get PROPERTY_ENTRY_INTEGER() that is needed to
fix pxa/raumfeld rotary encoder properties.
2016-03-15 16:54:45 -07:00
Dmitry Torokhov 52cdce8adb Merge branch 'rotary-encoder' into next
Bring in updates to roraty encoder driver switching it away from legacy
platform data and over to generic device properties and adding support
for encoders using more than 2 GPIOs.
2016-03-04 11:32:40 -08:00
Dudley Du 3cd4786943 Input: cyapa - fix for losing events during device power transitions
When changing the scan rate as part of runtime-resume process we may lose
some of the events, because:

1) for gen3 trackpads, the driver must msleep() some time to ensure that
the device is ready to accept next command;

2) for gen5 and later trackpads, the queue dumping function will simply
ignore the events when waiting for the set power mode command response.

The solution is to keep polling and report those valid events when the set
power mode command is in progress.

Signed-off-by: Dudley Du <dudl@cypress.com>
Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-04 11:32:13 -08:00
Chris Diamand 98ee377144 Input: byd - add BYD PS/2 touchpad driver
Driver for the BYD BTP10463 touchpad, found in PC Specialist `Lafite'
laptops. This patch sends the magic command sequence which causes the
touchpad to stream intellimouse-style packets.

Gestures are detected inside the touchpad, and exposed as special
values in the Z component of each packet - absolute coordinates are
not supported, even in the Windows driver. At present, this supports
two-finger vertical and horizontal scrolling, and provides the
framework to expose the other gestures it can recognize.

Signed-off-by: Chris Diamand <chris@diamand.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-01-27 17:27:25 -08:00
Dmitry Torokhov d4f1b06d68 Input: vmmouse - fix absolute device registration
We should set device's capabilities first, and then register it,
otherwise various handlers already present in the kernel will not be
able to connect to the device.

Reported-by: Lauri Kasanen <cand@gmx.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-01-27 16:03:30 -08:00
Dmitry Torokhov 009f773836 Merge branch 'next' into for-linus
Prepare first round of input updates for 4.5 merge window.
2016-01-11 17:47:25 -08:00
Benjamin Tissoires 6544a1df11 Input: elantech - mark protocols v2 and v3 as semi-mt
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 3c0213d17a ("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>
2016-01-11 17:45:32 -08:00
Pali Rohár 4b1af85364 Input: ALPS - report v3 pinnacle trackstick device only if is present
This patch moves v3 pinnacle code for trackstick detection from
alps_hw_init_v3() to alps_set_protocol() so ALPS_DUALPOINT flag can be
cleared before registering trackstick input device in kernel.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-01-06 16:06:47 -08:00
Pali Rohár dae928ec3c Input: ALPS - detect trackstick presence for v7 protocol
This patch adds detection of trackstick for v7 protocol devices. Code in
this patch is used in official Dell touchpad linux drivers for Dell models:
Dell Latitude E5250/5250, E5450/5450, E5550/5550

Detection code and base reg for alps v3 rushmore and v7 devices is exacly
same.

Also user in bug https://bugzilla.kernel.org/show_bug.cgi?id=94801 reported
that Toshiba Sattellite Z30-A-1DG has only alps v7 touchpad device without
trackstick and kernel reports to userspace also redundant trackstick
device.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-01-06 16:06:46 -08:00
Dmitry Torokhov f01c5e652c Merge branch 'psmouse-passthrough' into next
Bring in changes to limit number of protocols we try on pass-though PS/2
ports so that probe ocmpletes faster.
2015-12-17 15:25:10 -08:00
Dmitry Torokhov 190e2031e2 Input: psmouse - rename ps2pp_init() to ps2pp_detect()
This makes Logitech PS2++ protocol implementation consistent with
the naming in other protocols. Also mark the stub as "static inline"

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:24:37 -08:00
Dmitry Torokhov ec6184b1c7 Input: psmouse - limit protocols that we try on passthrough ports
PS/2 protocol is slow, and using it with pass-through port (where we
encapsulate PS/2 into PS/2) is slower yet so it takes quite a bit of time
to do full protocol discovery for device attached to a pass-through port.
However, so far we have not see anything but trackpoints or basic PS/2
mice on pass-through ports, so let's limit protocols that we probe there
to Trackpoint, IntelliMouse Explorer, IntelliMouse, and bare PS/2 protocol,
and avoid other extended protocols, such as Synaptics, ALPS, etc.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:24:32 -08:00
Dmitry Torokhov c378b5119e Input: psmouse - factor out common protocol probing code
In preparation of limiting protocols that we try on pass-through ports,
let's rework initialization code and factor common code into
psmouse_try_protocol() that accepts protocol type (instead of detec()
function pointer) and can, for most protocols, perform both detection and
initialization.

Note that this removes option of forcing Lifebook protocol on devices that
are not recognized by lifebook_detect() as having the hardware, but I do
not recall anyone using this option.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:24:21 -08:00
Dmitry Torokhov 5fa75cfe23 Input: psmouse - move protocol descriptions around
We move protocol descriptions and psmouse_find_by_type() and
pmouse_find_by_name() so that we can use them without forward declarations
in the subsequent patches.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:24:16 -08:00
Dmitry Torokhov 24a06f3e3a Input: psmouse - clean up Cypress probe
When Cypress protocol support is disabled cypress_init() is a stub that
always returns -ENOSYS, so there is not point in testing for
CONFIG_MOUSE_PS2_CYPRESS after we decided that we are dealing with a
Cypress device. Also, we should only be calling cypress_detect() when
set_properties argument is "true", like with other protocols.

There is a slight change in behavior to make follow-up patches more
uniform: when we detect Cypress but its initialization fails, instead of
immediately returning PSMOUSE_PS2 protocol we now continue trying
IntelliMouse [Explorer]. Given that Cypress devices only have issue with
Sentelic probes probing Imtellimouse should be safe.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:24:04 -08:00
Dmitry Torokhov 2b6f39e9ee Input: psmouse - rearrange Focaltech init code
The fact that we were calling focaltech_init() even when Focaltech support
is disabled was confusing. Rearrange the code so that if support is
disabled we continue to fall through the rest of protocol probing code
until we get to full reset that Focaltech devices need to work properly.

Also, replace focaltech_init() with a stub now that it is only called when
protocol is enabled.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:23:54 -08:00
Dmitry Torokhov ad5307715b Input: psmouse - fix comment style
The module was using non-standard comment style with comment blocks often
starting at the very beginning of a line instead of being aligned with the
code. Let's switch to standard formatting.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:23:43 -08:00
Dmitry Torokhov 0a88d60784 Input: psmouse - use switch statement in psmouse_process_byte()
Instead of a series mostly exclusive "if" statements testing protocol type
of the mouse let's use "switch" statement.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-12-17 15:23:34 -08: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
Dmitry Torokhov bbdb5c22e1 Merge branch 'next' into for-linus
Prepare second round of input updates for 4.3 merge window.
2015-11-13 11:56:45 -08:00
Takashi Iwai 60603950f8 Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled
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>
2015-11-06 11:27:08 -08:00
Hans de Goede 195562194a Input: alps - only the Dell Latitude D420/430/620/630 have separate stick button bits
commit 92bac83dd7 ("Input: alps - non interleaved V2 dualpoint has
separate stick button bits") assumes that all alps v2 non-interleaved
dual point setups have the separate stick button bits.

Later we limited this to Dell laptops only because of reports that this
broke things on non Dell laptops. Now it turns out that this breaks things
on the Dell Latitude D600 too. So it seems that only the Dell Latitude
D420/430/620/630, which all share the same touchpad / stick combo,
have these separate bits.

This patch limits the checking of the separate bits to only these models
fixing regressions with other models.

Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@vger.kernel.org
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-By: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-26 17:23:48 -07:00
Dudley Du a487c03fa2 Input: cyapa - fix the copy paste error on electrodes_rx value
Fix the copy paste error on the electrodes_rx value set code which will
cause the electrodes_rx value be always set to the value of electrodes_y.

Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-13 23:29:52 -07:00
Dmitry Torokhov 62d7846144 Revert "Input: synaptics - fix handling of disabling gesture mode"
This reverts commit e51e38494a: we
actually do want the device to work in extended W mode, as this is the
mode that allows us receiving multiple contact information.

Cc: stable@vger.kernel.org
2015-10-02 10:31:32 -07: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
Daniel Drake 9d7b03f863 Input: elan_i2c - don't require known iap version
The Asus X456UA has an ELAN1000 touchpad with IAP version 0xe.  This is
unknown to elan_get_fwinfo() so driver probe fails and I am left with an
unusable touchpad.

However, the fwinfo is not required for general driver usage, it is only
needed if the user decides to upload new firmware.

Adjust the driver so that we do not abort probe when we encounter
unexpected IAP version, but rather warn user that firmware update feature
of the driver will not work.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-21 09:32:39 -07:00
Dmitry Torokhov 53431d0a35 Merge branch 'next' into for-linus
Prepare second round of input updates for 4.3 merge window.
2015-09-11 09:02:36 -07:00
João Paulo Rechi Vita 4aeca98c49 Input: elan_i2c - add ACPI ID "ELAN1000"
This ACPI ID present in the DSDT of the ASUS E202SA laptop.

Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03 10:56:18 -07:00
Dmitry Torokhov 01b944fe1c Merge branch 'next' into for-linus
Prepare first round of input updates for 4.3 merge window.
2015-09-03 10:01:44 -07:00
Duson Lin 58f1eae48e Input: elan_i2c - use iap_version to get firmware information
When driver is in IAP mode ic_type query may return 0xff. However
iap_version will always be valid, so let's use it to determine parameters
of the firmware that the controller is supposed to accept.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-03 10:00:16 -07:00
Benson Leung 742f452b9b Input: elan_i2c - fix typos for validpage_count
Search for "vaildpage_count" and replace with "validpage_count".

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-28 17:46:24 -07:00
Stefan Assmann 66bc2f51ef Input: psmouse - add small delay for IBM trackpoint pass-through mode
There are trackpoint devices that fail to respond to the PS2 command
PSMOUSE_CMD_GETID if immediately queried after the parent device is
deactivated. Add a small delay for the hardware to get in a sane state
before sending any PS2 commands.

One example of such a system is:
Lenovo ThinkPad X120e, model 30515QG
synaptics: Touchpad model: 1, fw: 8.0, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x121c00, board id: 1811, fw id: 797391

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-26 13:14:25 -07:00
Dmitry Torokhov e51e38494a Input: synaptics - fix handling of disabling gesture mode
Bit 2 of the mode byte has dual meaning: it can disable reporting of
gestures when touchpad works in Relative mode or normal Absolute mode,
or it can enable so called Extended W-Mode when touchpad uses enhanced
Absolute mode (W-mode). The extended W-Mode confuses our driver and
causes missing button presses on some Thinkpads (x250, T450s), so let's
make sure we do not enable it.

Also, according to the spec W mode "... bit is defined only in Absolute
mode on pads whose capExtended capability bit is set. In Relative mode and
in TouchPads without this capability, the bit is reserved and should be
left at 0.", so let's make sure we respect this requirement as well.

Reported-by: Nick Bowler <nbowler@draconx.ca>
Suggested-by: Gabor Balla <gaborwho@gmail.com>
Tested-by: Gabor Balla <gaborwho@gmail.com>
Tested-by: Nick Bowler <nbowler@draconx.ca>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-26 10:09:22 -07:00
Michele Curti 534fcb3bda Input: elan_i2c - enable ELAN0100 acpi panels
Enable ELAN0100 touchpad driver, found on a Asus X205TA laptop, to
gai 2,3 fingers tap and 2 fingers scroll.

Signed-off-by: Michele Curti <michele.curti@gmail.com>
Reviewed-by: Duson Lin <dusonlin@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-24 10:55:49 -07:00
Dan Carpenter 9c8f55798a Input: sentelic - silence some underflow warnings
I have a static checker that complains when we check for an upper bound
but don't have a corresponding check for a lower bound.  With this code,
the upper bound check seems not really required, so it is not a bug to
leave the lower bound check out as well.  But let's silence the warning
by making these variables unsigned.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-21 09:32:59 -07:00
Dmitry Torokhov 71d0f56235 Input: elan_i2c - enable asynchronous probing
It takes a bit of time to go through controller power up sequence and
initialization. To not stall the overall boot progress let's probe the
controller asynchronously, given that userspace is usually prepared for
hot-plugging of input devices and thus does not rely on particular
ordering.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07 14:55:39 -07:00
Duson Lin 6b30c73e9f Input: elantech - add special check for fw_version 0x470f01 touchpad
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>
2015-08-07 14:54:15 -07:00
Geert Uytterhoeven 7d6548abcf Input: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04 11:45:45 -07:00
Hans de Goede 073e570d7c Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
It turns out that only Dell laptops have the separate button bits for
v2 dualpoint sticks and that commit 92bac83dd7 ("Input: alps - non
interleaved V2 dualpoint has separate stick button bits") causes
regressions on Toshiba laptops.

This commit adds a check for Dell laptops to the code for handling these
extra button bits, fixing this regression.

This patch has been tested on a Dell Latitude D620 to make sure that it
does not reintroduce the original problem.

Reported-and-tested-by: Douglas Christman <douglaschristman@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-03 14:11:47 -07:00
Dudley Du 0642ffd6a8 Input: cyapa - do not try to enable proximity reporting on older devices
Avoid the driver generate warning message when the cyapa driver working
with the old Gen5 trackpad device which does not support the proximity
function.  Those old Gen5 trackpad device all have the platform version
less than 2.

Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30 11:34:00 -07:00
Dudley Du ddbb299db0 Input: cyapa - introduce device tree binding
Add device tree support for  Cypress trackpad devices.

Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30 11:33:59 -07:00
Dudley Du 36e9615bd7 Input: cyapa - add regulator vcc support
We need to power up the chip before we can initialize it.

On systems that delegate task of powering up regulators to firmware we
assume that we'll be simply given a dummy regulator.

Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-30 11:33:59 -07:00
John Horan d58069265c Input: bcm5974 - add support for the 2015 Macbook Pro
Add support for the MacBookPro12,1 model. This patch needs to be
applied together with the accompanied HID patch, as usual.

Tested-by: John Horan <knasher@gmail.com>
Tested-by: Jochen Radmacher <jradmacher@gmx.de>
Tested-by: Yang Hongyang <burnef@gmail.com>
Tested-by: Yen-Chin, Lee <coldnew.tw@gmail.com>
Tested-by: George Hilios <ghilios@gmail.com>
Tested-by: Janez Urevc <janez@janezurevc.name>
Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-27 15:43:47 -07:00