Guenter Roeck [Sun, 22 Jan 2017 07:49:38 +0000 (23:49 -0800)]
Input: serio - drop unnecessary calls to device_init_wakeup
Calling device_init_wakeup in the remove function is unnecessary since the
device is going away, and thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code already handles the
necessary cleanup.
Similarly, disabling wakeup in the probe error path is unnecessary, as is
disabling wakeup in the probe function in the first place.
Guenter Roeck [Sun, 22 Jan 2017 07:49:13 +0000 (23:49 -0800)]
Input: touchscreen - drop unnecessary calls to device_init_wakeup
Calling device_init_wakeup in the remove function is unnecessary since the
device is going away, and thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code already handles the
necessary cleanup.
Similarly, disabling wakeup in the probe error path is unnecessary, as is
disabling wakeup in the probe function in the first place.
Guenter Roeck [Sun, 22 Jan 2017 07:48:45 +0000 (23:48 -0800)]
Input: misc - drop unnecessary calls to device_init_wakeup
Calling device_init_wakeup in the remove function is unnecessary since the
device is going away, and thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code already handles the
necessary cleanup.
Similarly, disabling wakeup in the probe error path is unnecessary, as is
disabling wakeup in the probe function in the first place.
Guenter Roeck [Sun, 22 Jan 2017 07:47:44 +0000 (23:47 -0800)]
Input: keyboard - drop unnecessary calls to device_init_wakeup
Calling device_init_wakeup in the remove function is unnecessary since the
device is going away, and thus won't be able to cause any wakeups under any
circumstances. Besides, the driver cleanup code already handles the
necessary cleanup.
Similarly, disabling wakeup in the probe error path is unnecessary, as is
disabling wakeup in the probe function in the first place.
Hans de Goede [Sat, 21 Jan 2017 19:14:14 +0000 (11:14 -0800)]
Input: soc_button_array - debounce the buttons
The soc_button_array driver was initializing (kzalloc) the
debounce_interval value to 0, leading to no debouncing at all,
while the buttons are simple mechanical switches.
This commit sets debounce_interval to 50ms to avoid spurious button
press reports both on press and release of the button. Note 50ms may
seem like a lot but soc_button_array is typically used with cheap
tablets, with not so great buttons. I tried 10ms on my tablet and it
is not enough, where as 50ms works well.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jaechul Lee [Wed, 18 Jan 2017 22:35:42 +0000 (14:35 -0800)]
Input: tm2-touchkey - add touchkey driver support for TM2
This patch adds support for the TM2 touch key and led functionality.
The driver interfaces with userspace through an input device and reports
KEY_PHONE and KEY_BACK event types. LED brightness can be controlled by
"/sys/class/leds/tm2-touchkey/brightness".
Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Guenter Roeck [Wed, 18 Jan 2017 19:36:25 +0000 (11:36 -0800)]
Input: bfin_rotary - switch to using devm_add_action_or_reset()
Use local variable 'dev' instead of dereferencing it several times and
replace devm_add_action() and manual error handling with
devm_add_action_or_reset().
Guenter Roeck [Wed, 18 Jan 2017 19:21:24 +0000 (11:21 -0800)]
Input: atmel-wm97xx - drop unnecessary error messages
Error messages after memory allocation failures are unnecessary and
can be dropped, especially give that they were emitted as dev_dbg() so
noone except person actively debugging the driver would see them.
Guenter Roeck [Wed, 18 Jan 2017 19:12:00 +0000 (11:12 -0800)]
Input: at32psif - drop unnecessary error messages and other changes
Error messages after memory allocation failures are unnecessary and
can be dropped, given that they are emitted as dev_dbg() so nobody except
person actively debugging the driver would see them.
Also replace jump to return 'goto l; ... l: return e;' with 'return e;'
Guenter Roeck [Wed, 18 Jan 2017 18:37:49 +0000 (10:37 -0800)]
Input: cros_ec_keyb - drop unnecessary call to dev_set_drvdata and other changes
There is no call to platform_get_drvdata() or dev_get_drvdata().
Drop the unnecessary call to dev_set_drvdata().
Other relevant changes:
Use existing variable 'dev' instead of dereferencing it several times
This conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches
- Drop dev_set_drvdata()
- Use local variable 'struct device *dev' consistently
Maxime Ripard [Tue, 17 Jan 2017 21:24:22 +0000 (13:24 -0800)]
Input: tca8418 - use the interrupt trigger from the device tree
The TCA8418 might be used using different interrupt triggers on various
boards. This is not working so far because the current code forces a
falling edge trigger.
The device tree already provides a trigger type, so let's use whatever it
sets up, and since we can be loaded without DT, keep the old behaviour for
the non-DT case.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
ulseep_range() uses hrtimers and provides no advantage over msleep()
for larger delays. Fix up the 50ms delays here to use msleep() and
reduce the load on the hrtimer subsystem.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Using counter based retry loops for peripherals results in the delay
being significantly overrun during high-load situations where delay
functions tend to be vary imprecise and overrun there timeouts. So
condition the termination on the actual condition of 2s for the
re-calibration to have been successful.
As this is a very long delay there is no advantage in using
high-resolution timers thus switching this to msleep().
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Akinobu Mita [Sun, 15 Jan 2017 22:51:12 +0000 (14:51 -0800)]
Input: mpr121 - switch to device tree probe
This driver currently only supports legacy platform data probe. This
change adds device tree support and gets rid of platform data probe code
since no one is actually using mpr121 platform data in the mainline.
The device tree property parsing code is based on the work of
atmel_captouch driver.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Akinobu Mita [Sun, 15 Jan 2017 22:44:30 +0000 (14:44 -0800)]
Input: mpr121 - handle multiple bits change of status register
This driver reports input events on their interrupts which are triggered
by the sensor's status register changes. But only single bit change is
reported in the interrupt handler. So if there are multiple bits are
changed at almost the same time, other press or release events are ignored.
This fixes it by detecting all changed bits in the status register.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Akinobu Mita [Sun, 15 Jan 2017 22:44:05 +0000 (14:44 -0800)]
Input: mpr121 - set missing event capability
This driver reports misc scan input events on the sensor's status
register changes. But the event capability for them was not set in the
device initialization, so these events were ignored.
This change adds the missing event capability.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Aniroop Mathur [Wed, 4 Jan 2017 18:57:51 +0000 (10:57 -0800)]
Input: edt_ft5x06 - change msleep to usleep_range for small msecs
msleep(1~20) may not do what the caller intends, and will often sleep
longer (~20 ms actual sleep for any value given in the 1~20ms range). This
is not the desired behaviour for many cases like device resume time, device
suspend time, device enable time, retry logic, etc. Thus, change msleep to
usleep_range for precise wakeups.
Cameron Gutman [Wed, 4 Jan 2017 06:40:38 +0000 (22:40 -0800)]
Input: xpad - don't depend on endpoint order
The order of endpoints is well defined on official Xbox pads, but
we have found at least one 3rd-party pad that doesn't follow the
standard ("Titanfall 2 Xbox One controller" 0e6f:0165).
Fortunately, we get lucky with this specific pad because it uses
endpoint addresses that differ only by direction. We know that
there are other pads out where this is not true, so let's go
ahead and fix this.
Aniroop Mathur [Tue, 27 Dec 2016 21:22:42 +0000 (13:22 -0800)]
Input: bma150 - switch to using usleep_range instead of msleep
msleep (1~20) may not do what the caller intends, and will often sleep
longer. (~20 ms actual sleep for any value given in the 1~20ms range) This
is not the desired behaviour for many cases like device resume time, device
suspend time, device enable time, etc. Thus, change msleep to usleep_range
for precise wakeups.
Dmitry Torokhov [Mon, 12 Dec 2016 22:33:37 +0000 (14:33 -0800)]
Input: i8042 - force synchronous probing of PNP drivers
We rely on the result of scanning PNP bus for keyboard and mouse devices to
decide whether we should continue initialization of i8042 driver or not, so
the probes can not be asynchronous.
Also, it is not a good idea to unbind either of the PNP devices while i8042
is running, so let's disable bind/unbind for the PNP drivers through sysfs
and rely on i8042 cleaning after itself properly. User can still unbind and
rebind entire i8042 and that will take care of PNP drivers as well.
Reviewed-by: Luis R. Rodriguez <mgrof@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jingkui Wang [Sun, 11 Dec 2016 06:44:10 +0000 (22:44 -0800)]
Input: drv260x - use generic device properties
Update driver drv260x to use generic device properties so that it can be
used on non-DT systems. We also remove platform data as generic device
properties work on static board code as well.
Signed-off-by: Jingkui Wang <jkwang@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
We were assigning I2C bus controller instead of client as parent device.
Besides being logically wrong, it messed up with devm handling of input
device. As a result we were leaving input device and event node behind
after rmmod-ing the driver, which lead to a kernel oops if one were to
access the event node later.
Let's remove the assignment and rely on devm_input_allocate_device() to
set it up properly for us.
Signed-off-by: Jingkui Wang <jkwang@google.com> Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: lpc32xx-keys - fix invalid error handling of a requested irq
Semantics of NR_IRQS is different on machines with SPARSE_IRQ option
disabled or enabled, in the latter case IRQs are allocated starting
at least from the value specified by NR_IRQS and going upwards, so
the check of (irq >= NR_IRQ) to decide about an error code returned by
platform_get_irq() is completely invalid, don't attempt to overrule
irq subsystem in the driver.
The change fixes lpc32xx_keys driver initialization on boot:
lpc32xx_keys 40050000.key: failed to get platform irq
lpc32xx_keys: probe of 40050000.key failed with error -22
Input: synaptics-rmi4 - allow to add attention data
The HID implementation of RMI4 provides the data during
the interrupt (in the input report). We need to provide
a way for this transport driver to provide the attention
data while calling an IRQ.
We use a fifo in rmi_core to not lose any incoming event.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: synaptics-rmi4 - f03 - grab data passed by transport device
First check if there are data available passed by the transport device.
If data available use these data. If there are no data available
try to read the rmi block if dsata are passed this way.
This is the way the other rmi function handlers will do this.
This patch is needed on HID devices because the firmware reads F03 data
registers and adds them to the HID attention report. Reading those
registers from the driver after the firmware read them will result in
invalid data.
Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Guy Shapiro [Wed, 30 Nov 2016 18:25:11 +0000 (10:25 -0800)]
Input: imx6ul_tsc - convert int to u32
The code uses of_property_read_u32 and expects positive values. However,
the values are stored in signed int variables. Additionally, the registers
values are also stored in signed variables without a good reason
(readl/writel expect u32).
The only time this caused a real bug was in the new average-samples
property, in which the property is numerically compared and implicitly
expected to be positive.
I believe it's better to change all the properties and registers to u32,
for consistency and warnings reduction.
Haibo Chen [Wed, 30 Nov 2016 17:02:06 +0000 (09:02 -0800)]
Input: imx6ul_tsc - add mask when set REG_ADC_CFG
Add mask of each function bits of REG_ADC_CFG, and clear these
function bits first, otherwise use '|=' operation may get the
wrong setting which depends on the original value of REG_ADC_CFG.
Input: synaptics-rmi4 - have only one struct platform data
If struct rmi_device_platform_data contains pointers to other struct,
it gets difficult to allocate a fixed size struct and copy it over between
drivers.
Change the pointers into a struct and change the code in rmi4 accordingly.
Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: synaptics-rmi4 - remove mutex calls while updating the firmware
This partially reverts commit 29fd0ec2bdbe ("Input: synaptics-rmi4 -
add support for F34 device reflash")
irq_mutex should be used only to protect data->current_irq_mask, not
preventing incoming input to be processed while the upgrade of the
firmware is happening. We can simply disable the irqs when we don't
want them to interfere with the upgrade process.
Tested on S7300 and S7800 (with F34 v7 patch added)
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Florian Vaussard [Wed, 30 Nov 2016 01:39:25 +0000 (17:39 -0800)]
Input: drv2667 - fix misuse of regmap_update_bits
Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k)
and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform
(mask & 1), which results in 0 if LSB of mask is 0. Thus the call
regmap_update_bits(..., mask, 1) is in reality equivalent to
regmap_update_bits(..., mask, 0).
In such a case, the correct use is regmap_update_bits(..., mask, mask).
This driver is performing such a mistake with the DRV2667_STANDBY mask,
which equals (1 << 6). Fix the driver to make it consistent with the
API, and fix the alignment problem at the same time. Please note that
this change is untested, as I do not have this piece of hardware.
Testers are welcome!
Florian Vaussard [Wed, 30 Nov 2016 01:38:58 +0000 (17:38 -0800)]
Input: drv2665 - fix misuse of regmap_update_bits
Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k)
and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform
(mask & 1), which results in 0 if LSB of mask is 0. Thus the call
regmap_update_bits(..., mask, 1) is in reality equivalent to
regmap_update_bits(..., mask, 0).
In such a case, the correct use is regmap_update_bits(..., mask, mask).
This driver is performing such a mistake with the DRV2665_STANDBY mask,
which equals BIT(6). Fix the driver to make it consistent with the API,
and fix the alignment problem at the same time. Please note that this
change is untested, as I do not have this piece of hardware. Testers
are welcome!
Paul Donohue [Tue, 29 Nov 2016 04:16:21 +0000 (20:16 -0800)]
Input: ALPS - clean up code for SS5 hardware
The return value of alps_get_pkt_id_ss4_v2() should really be "enum
SS4_PACKET_ID", not "unsigned char". Correct this.
Also, most of the Alps SS5 (SS4 v2) packet byte parsing code is implemented
using macros, but there are a few places where bytes are directly
manipulated in alps.c. For consistency, migrate the rest of these to
macros.
Paul Donohue [Tue, 29 Nov 2016 04:11:25 +0000 (20:11 -0800)]
Input: ALPS - fix TrackStick support for SS5 hardware
The current Alps SS5 (SS4 v2) code generates bogus TouchPad events when
TrackStick packets are processed.
This causes the xorg synaptics driver to print
"unable to find touch point 0" and
"BUG: triggered 'if (priv->num_active_touches > priv->num_slots)'"
messages. It also causes unexpected TouchPad button release and re-click
event sequences if the TrackStick is moved while holding a TouchPad
button.
This commit corrects the problem by adjusting alps_process_packet_ss4_v2()
so that it only sends TrackStick reports when processing TrackStick
packets.
Cameron Gutman [Mon, 28 Nov 2016 04:37:56 +0000 (20:37 -0800)]
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Unlike previous Xbox pads, the Xbox One pad doesn't have "sticky" rumble
packets. The duration is encoded into the command and expiration is handled
by the pad firmware.
ff-memless needs pseudo-sticky behavior for rumble effects to behave
properly for long duration effects. We already specify the maximum rumble
on duration in the command packets, but it's still only good for about 2.5
seconds of rumble. This is easily reproducible running fftest's sine
vibration test.
It turns out there's a repeat count encoded in the rumble command. We can
abuse that to get the pseudo-sticky behavior needed for rumble to behave as
expected for effects with long duration.
By my math, this change should allow a single ff_effect to rumble for 10
minutes straight, which should be more than enough for most needs.
Input: soc_button_array - bail out earlier if gpiod_count is zero
The PNP0C40 device of the Surface 3 doesn't have any GPIO attached to it.
Instead of trying to access the GPIO, request the count beforehand and
bail out if it is null or if an error is returned.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Guenter Roeck [Wed, 23 Nov 2016 01:57:02 +0000 (17:57 -0800)]
Input: synaptics-rmi4 - propagate correct number of rx and tx electrodes to F54
F54 diagnostics report functions provide data based on the number of
enabled rx and tx electrodes, which is not identical to the number of
electrodes reported with F54:Query0 and F54:Query1. Those values report
the number of supported electrodes, not the number of enabled electrodes.
The number of enabled electrodes can be determined by analyzing F55:Ctrl1
(sensor receiver assignment) and F55:Ctrl2 (sensor transmitter assignment).
Propagate the number of enabled electrodes from F55 to F54 to avoid
corrupted output if not all electrodes are enabled.
Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Guenter Roeck [Wed, 23 Nov 2016 01:53:26 +0000 (17:53 -0800)]
Input: synaptics-rmi4 - add support for F55 sensor tuning
Sensor tuning support is needed to determine the number of enabled
tx and rx electrodes for use in F54 functions.
The number of enabled electrodes is not identical to the total number
of electrodes as reported with F55:Query0 and F55:Query1. It has to be
calculated by analyzing F55:Ctrl1 (sensor receiver assignment) and
F55:Ctrl2 (sensor transmitter assignment).
Support for additional sensor tuning functions may be added later.
Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Sudeep Holla [Thu, 17 Nov 2016 01:01:26 +0000 (17:01 -0800)]
Input: gpio_keys - set input direction explicitly
Commit 700a38b27eef ("Input: gpio_keys - switch to using generic device
properties") switched to use generic device properties for GPIO keys and
commit 5feeca3c1e39 ("Input: gpio_keys - add support for GPIO descriptors")
switched from legacy GPIO numbers to GPIO descriptors.
Previously devm_gpio_request_one was explicitly passed GPIOF_DIR_IN flag
to set the GPIO direction as input. However devm_get_gpiod_from_child
doesn't have such provisions and hence fwnode_get_named_gpiod can't set
it as input.
This breaks few platforms with the following error:
" gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
unable to lock HW IRQ <n> for IRQ
genirq: Failed to request resources for POWER (irq <x>) on irqchip
gpio_keys: Unable to claim irq <x>; error -22
gpio-keys: probe failed with error -22 "
This patch fixes the issue by setting input direction explicitly for
gpio lines described by generic properties.
Fixes: 700a38b27eef ("Input: gpio_keys - switch to using generic device properties") Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hans de Goede [Mon, 14 Nov 2016 18:51:36 +0000 (10:51 -0800)]
Input: bma150 - avoid binding to bma180 if IIO bma180 driver present
commit ef3714fdbc8d ("Input: bma150 - extend chip detection for bma180"),
adds bma180 chip-ids to the input bma150 driver, assuming that they are
100% compatible, but the bma180 is not compatible with the bma150 at all,
it has 14 bits resolution instead of 10, and it has quite different
control registers too.
Treating the bma180 as a bma150 wrt its data registers will just result
in throwing away the lowest 4 bits, which is not too bad. But the ctrl
registers are a different story. Things happen to just work but supporting
that certainly does not make treating the bma180 the same as the bma150
right.
Since some setups depend on the evdev interface the bma150 driver offers
on top of the bma180, we cannot simply remove the bma180 ids.
So this commit only removes the bma180 id when the bma180 iio driver,
which does treat the bma180 properly, is enabled.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Code obtained from https://raw.githubusercontent.com/mightybigcar/synaptics-rmi4/jf/drivers/input/rmi4/rmi_smbus.c
and updated to match upstream. And fixed to make it work.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Andrew Duggan [Wed, 9 Nov 2016 01:03:16 +0000 (17:03 -0800)]
Input: synaptics-rmi4 - set the ABS_MT_TOOL_TYPE bit to report tool type
The rmi4 2D sensor functions report the tool type via
input_mt_report_slot_state(), but the abs parameter bit has not been
set so the tool type is not reported to userspace. This patch set
the ABS_MT_TOOL_TYPE bit.
Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Andrew Duggan [Wed, 9 Nov 2016 00:48:48 +0000 (16:48 -0800)]
Input: synaptics-rmi4 - add parameters for dribble packets and palm detect gesture
The rmi_f11 driver currently disables dribble packets and the palm detect
gesture for all devices. This patch creates a parameter in the 2d sensor
platform data for controlling this functionality on a per device basis.
For more information on dribble packets:
Commit 05ba999fcabb ("HID: rmi: disable dribble packets on Synaptics
touchpads")
For more information on the palm detect gesture:
Commit f097deef59a6 ("HID: rmi: disable palm detect gesture when present")
Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Andrew Duggan [Wed, 9 Nov 2016 00:46:20 +0000 (16:46 -0800)]
Input: synaptics-rmi4 - handle incomplete input data
Commit 5b65c2a02966 ("HID: rmi: check sanity of the incoming report") added
support for handling incomplete HID reports do to the input data being
corrupted in transit. This patch reimplements this functionality in the
function drivers so they can handle getting less valid data then they
expect.
Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Bjorn Andersson [Wed, 9 Nov 2016 00:34:57 +0000 (16:34 -0800)]
Input: synaptics-rmi4 - move IRQ handling to rmi_driver
The attn IRQ is related to the chip, rather than the transport, so move
all handling of interrupts to the core driver. This also makes sure that
there are no races between interrupts and availability of the resources
used by the core driver.
Steve Twiss [Wed, 9 Nov 2016 00:15:31 +0000 (16:15 -0800)]
Input: da9062 - update bindings docs to account for da9061
Add binding information for DA9061 onkey.
This patch updates the compatible string "dlg,da9061-onkey" to support
DA9061, removes the reference to KEY_SLEEP (which the driver no longer
supports) and fixes a typo in the example for DA9063.
Supporting KEY_SLEEP was not the general convention and the typical
solution should have been for KEY_POWER to support both cases of suspend
and S/W power off. This change was sent to the DA9063 ONKEY device
driver in a separate patch, but the documentation was not updated at
that time.
- f889bea Report KEY_POWER instead of KEY_SLEEP during power key-press
This patch also adds two new examples, one for DA9062 and one for DA9061.
The DA9061 examples uses a fall-back compatible string for the DA9062
onkey driver.
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Nick Dyer [Tue, 8 Nov 2016 01:33:07 +0000 (17:33 -0800)]
Input: synaptics-rmi4 - stop scanning PDT after two empty pages
We have encountered some RMI4 firmwares where there are blank pages in
between PDT pages which contain functions. This change makes them
correctly enumerate all functions on the device.
Tested on S7817 (has empty page 2).
Signed-off-by: Nick Dyer <nick@shmanahar.org>
[Tested successfully on S7817 and S7300 Synaptics touch controllers] Tested-by: Chris Healy <cphealy@gmail.com> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>