Age | Commit message (Collapse) | Author | Files | Lines |
|
rmi_dev is currently being dereferenced before it null checked, however,
after deeper inspecting, rmi_dev can never be null, so just remove this
redundant check.
Fixes CoverityScan CID 1391218 ("Dereference before null check")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
version is a u8, the check for version > 0 means that version can only
be zero, so the subsequent check for version != 0 is never true and
hence is redudant code and can be removed.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4
support, we can guard all of them at once with "if RMI4_CORE".
Also use tabs for F03 indentation.
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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 <[email protected]>
Signed-off-by: Andrew Duggan <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Implements reading and setting the dribble bit in F12's control registers.
Signed-off-by: Andrew Duggan <[email protected]>
Acked-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signed-off-by: Nick Dyer <[email protected]>
Tested-by: Chris Healy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signed-off-by: Nick Dyer <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
Tested-by: Chris Healy <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
[Tested successfully on S7817 and S7300 Synaptics touch controllers]
Tested-by: Chris Healy <[email protected]>
Reviewed-by: Andrew Duggan <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into synaptics-rmi4
Sync up with media tree to bring up latest Synaptics and Atmel changes.
|
|
Remove this warning:
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_set_rds_no_lock':
drivers/staging/media/bcm2048/radio-bcm2048.c:467:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
int err;
^~~
By returning the error code.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
drivers/media/usb/dvb-usb/pctv452e.c:115:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
While here, remove a dead function calling usb_control_msg().
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
There's no sense on decoding and generating a RC key code if
there was an error on the URB control message.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Instead of silently ignoring the error, return it.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
There's no sense on decoding and generating a RC key code if
there was an error on the URB control message.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
On this driver, most of the transfers are OK, but the I2C
one was using stack.
Reviewed-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
There are some conditions on this driver that are tested with
BUG_ON() with are not serious enough to hang a machine.
So, just return an error if this happens.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Reviewed-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Reviewed-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
Add checks to avoid going out of the buffer.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
If something bad happens while an USB control message is
transfered, return an error code.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Reviewed-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
If something goes wrong, return an error code, instead of
assuming that everything went fine.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|
|
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
|