Input: edt-ft5x06 - calculate points data length only once
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Mon, 3 Apr 2023 04:36:46 +0000 (21:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 3 Apr 2023 04:38:05 +0000 (21:38 -0700)
commit0df28e7166e803028c380c59dda530ffada0503c
treebb9b8f6abd437a3d63c2869fcc044a07da084715
parent079e60a53c25aeb1920e783fa7f7390eabb6afc0
Input: edt-ft5x06 - calculate points data length only once

It is pointless and expensive to calculate data in the interrupt that
depends on the type of touchscreen, which is detected on the driver
probe and cannot then be changed.
So calculate the size of the data buffer on the driver probe, as well as
the data retrieval command, and then use them in the ISR.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230402200951.1032513-10-dario.binacchi@amarulasolutions.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/edt-ft5x06.c