Input: ads7846 - consolidate coordinate filtering logic

The ads7846 driver has two separate filtering functions,
ads7846_filter() and ads7846_filter_one(), for the full-duplex and
half-duplex SPI paths, respectively.

They can be consolidated by extracting the core filtering logic for a
single command into a helper function, ads7846_filter_cmd(), which
iterates from l->skip to l->count. The half-duplex setup function is
updated to set l->skip = l->count - 1 so that the helper only processes
the last sample, preserving the original half-duplex behavior.

Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 file changed