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: 3a762dbd53 ("[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>
This commit is contained in:
Guenter Roeck
2016-11-22 17:57:02 -08:00
committed by Dmitry Torokhov
parent 6adba43fd2
commit c762cc68b6
4 changed files with 21 additions and 4 deletions

View File

@@ -354,6 +354,9 @@ struct rmi_driver_data {
u8 pdt_props;
u8 bsr;
u8 num_rx_electrodes;
u8 num_tx_electrodes;
bool enabled;
void *data;