From: Andrew Duggan <hidden> Date: 2016-08-22 16:59:36
From: Andrew Duggan <redacted>
The map_offset variable is specific to the register and needs to be reset
in the loop. Otherwise, subsequent register's subpacket maps will have
their bits set at the wrong index.
Signed-off-by: Andrew Duggan <redacted>
Tested-by: Nitin Chaudhary <redacted>
Reviewed-by: Benjamin Tissoires <redacted>
Cc: stable@vger.kernel.org
---
In rmi_f12_read_sensor_tuning() we call rmi_register_desc_has_subpacket()
to check the subpacket map to make sure a subpacket exists to ensure that
the buffer contains the correct data. It happened that on my the test
devices the register we were checking was also the first register. This
issues showed up on newer devices where F12 CTRL 8 is not teh first control
register.
V2 moves map_offset closer to the do/while loop.
Thanks,
Andrew
drivers/input/rmi4/rmi_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
On Mon, Aug 22, 2016 at 09:58:57AM -0700, Andrew Duggan wrote:
From: Andrew Duggan <redacted>
The map_offset variable is specific to the register and needs to be reset
in the loop. Otherwise, subsequent register's subpacket maps will have
their bits set at the wrong index.
Signed-off-by: Andrew Duggan <redacted>
Tested-by: Nitin Chaudhary <redacted>
Reviewed-by: Benjamin Tissoires <redacted>
Cc: stable@vger.kernel.org
Applied, thank you.
quoted hunk
---
In rmi_f12_read_sensor_tuning() we call rmi_register_desc_has_subpacket()
to check the subpacket map to make sure a subpacket exists to ensure that
the buffer contains the correct data. It happened that on my the test
devices the register we were checking was also the first register. This
issues showed up on newer devices where F12 CTRL 8 is not teh first control
register.
V2 moves map_offset closer to the do/while loop.
Thanks,
Andrew
drivers/input/rmi4/rmi_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)