Age | Commit message (Collapse) | Author | Files | Lines |
|
A minus character was lost in commit 23fce365, causing the Y axis to be
inverted for SS5 TrackStick events. (Pushing the TrackStick up caused
the pointer to move down, and vice versa.) Restore the lost minus.
Fixes: 23fce365c6a2 ("Input: ALPS - clean up code for SS5 hardware")
Signed-off-by: Paul Donohue <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This brings in fix for F03 build error when serio is module.
|
|
Since F03 is a boolean, "depends" on symbols that can be modules
do not work quite right. We can enable F03 if SERIO is built-in or
if both RMI core and SERIO core are modules. If SERIO core is module,
but RMI is built-in, we'll get:
drivers/built-in.o: In function `rmi_f03_attention':
rmi_f03.c:(.text+0xf8ef8): undefined reference to `serio_interrupt'
rmi_f03.c:(.text+0xf8fbd): undefined reference to `serio_interrupt'
drivers/built-in.o: In function `rmi_f03_remove':
rmi_f03.c:(.text+0xf9082): undefined reference to `serio_unregister_port'
drivers/built-in.o: In function `rmi_f03_probe':
rmi_f03.c:(.text+0xf9260): undefined reference to `__serio_register_port'
Reported-by: Randy Dunlap <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
currently the controllers get the same product id as the wireless
receiver. However the controllers actually have their own product id.
The patch makes the driver expose the same product id as the windows
driver.
This improves compatibility when running applications with WINE.
see https://github.com/paroj/xpad/issues/54
Signed-off-by: Pavel Rojtberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Signed-off-by: Aniroop Mathur <[email protected]>
Acked-by: Igor Grinberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Avoid AUX loopback in Pegatron C15B touchpad, so input subsystem is able
to recognize a Synaptics touchpad in the AUX port.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=93791
(Touchpad is not detected on DNS 0801480 notebook (PEGATRON C15B))
Suggested-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Marcos Paulo de Souza <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This patch remove the inclusion of linux/miscdevice.h for joydev
since it does not use miscdevice.
Signed-off-by: Corentin Labbe <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Prepare input updates for 4.10 merge window.
|
|
Merge updated Synaptics RMI4 support, including support for SMBus
controllers and flashing firmware.
|
|
Make the avarage-samples property a general touchscreen property
rather than imx6ul device specific.
Signed-off-by: Guy Shapiro <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Let's introduce a temporary for "client->dev" is probe() as we use
it quite a few times and "dev" is shorter.
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver")
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Port firmware update code from Samsung Galaxy S7 driver into
mainline framework.
This patch has been tested on Synaptics S7813.
Signed-off-by: Nick Dyer <[email protected]>
Tested-by: Chris Healy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
We were accidentally initializing haptics->rated_voltage twice, and did not
initialize overdrive voltage.
Acked-by: Dan Murphy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signed-off-by: Marcos Paulo de Souza <[email protected]>
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
As this define check if huge, this makes easier to read the code.
Signed-off-by: Marcos Paulo de Souza <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Acked-by: Sylvain Lemieux <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The debug would only ever output zero for the clip information.
Signed-off-by: Nick Dyer <[email protected]>
Reviewed-by: Andrew Duggan <[email protected]>
Tested-by: Chris Healy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Now that we have a proper API to set the attention data, there is
no point in keeping it in the transport driver.
Signed-off-by: Benjamin Tissoires <[email protected]>
Reviewed-by: Andrew Duggan <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Andrew Duggan <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dennis Wassenberg <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This adds basic functionality for PS/2 passthrough on Synaptics
Touchpads using RMI4 through smbus.
Reviewed-by: Andrew Duggan <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Signed-off-by: Guy Shapiro <[email protected]>
Reported-by: Bjørn Forsman <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Signed-off-by: Haibo Chen <[email protected]>
Reviewed-by: Guy Shapiro <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
those functions should not be used outside of rmi_core.ko.
There is no point in exporting them to the world.
It looks like rmi_read_pdt_entry() should be static too.
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Nick Dyer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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!
Signed-off-by: Florian Vaussard <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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!
Signed-off-by: Florian Vaussard <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Set the .enabled boolean and trigger an event processing when enabling
for edge-triggered systems.
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
These fields are not used anywhere, there is no point in carrying them.
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Typos...
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
0x275 is used by KEY_FASTREVERSE.
Fixes: 488326947cd1 ("Input: add HDMI CEC specific keycodes")
Signed-off-by: Ping Cheng <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Paul Donohue <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
For consistency and clarity, the input_report_*() functions should be
called by alps_process_packet_ss4_v2() instead of by alps_decode_ss4_v2().
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Paul Donohue <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Paul Donohue <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The i.MX6UL internal touchscreen controller contains an option to
average upon samples. This feature reduces noise from the produced
touch locations.
This patch adds sample averaging support to the imx6ul_tsc device
driver.
Signed-off-by: Guy Shapiro <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Signed-off-by: Cameron Gutman <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This is the new gamepad that ships with the Xbox One S which
includes Bluetooth functionality.
Signed-off-by: Cameron Gutman <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
gpio_keys will later use gpio_is_valid(). To match the actual
behavior, we should use it here too.
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signed-off-by: Marcos Paulo de Souza <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Tested-by: Nick Dyer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Tested-by: Nick Dyer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Add support for updating firmware, triggered by a sysfs attribute.
This patch has been tested on Synaptics S7300.
Signed-off-by: Nick Dyer <[email protected]>
Tested-by: Chris Healy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
We should unlock before returning on this error path.
Fixes: 3a762dbd5347 ('[media] Input: synaptics-rmi4 - add support for F54 diagnostics')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
BYD automatic protocol detection is extremely unreliable and is often
triggers false positives on regular mice, Sentelic touchpads, and other
devices. BYD has several documents that have recommended detection
sequence, but they conflict with each other and, as far as I can see, still
would not produce unique enough output to reliably differentiate BYD from
other PS/2 devices.
OEMs sourcing BYD devices also do not do us any favors by not supplying any
reasonable DMI data and instead leaving turds like "To Be Filled By O.E.M."
in place of vendor data, or "System Serial Number" as serial number.
On top of that BYD is not truly modern multitouch controller, but rather a
single-touch transitional device that only reports absolute coordinates at
the beginning of finger contact and then reverts to reporting
displacements, and thus not very precise; the only benefit from using BYD
mode vs the legacy PS/2 mode is possibility of edge scrolling.
Given the above, and the fact that BYD devices are somewhat uncommon, let's
disable automatic detection of BYD devices. Users who know they have BYD
trackpads or want to experiment can attempt to activate BYD protocol via
sysfs:
echo -n "byd" > /sys/bus/serio/devices/serio1/drvctl
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=151691
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=175421
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=120781
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=121281
Fixes: 98ee37714493 ("Input: byd - add BYD PS/2 touchpad driver")
Cc: [email protected] # 4.6+
Reviewed-by: Pali Rohár <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Trivial fix to spelling mistake "failied" to "failed" in
dev_err message.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|