linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iio/adc-joystick: buffer data parsing fixes
@ 2023-05-21 22:58 Artur Rojek
  2023-05-21 22:59 ` [PATCH v2 1/2] iio/adc: ingenic: Fix channel offsets in buffer Artur Rojek
  2023-05-21 22:59 ` [PATCH v2 2/2] input: joystick: Fix buffer data parsing Artur Rojek
  0 siblings, 2 replies; 13+ messages in thread
From: Artur Rojek @ 2023-05-21 22:58 UTC (permalink / raw)
  To: Paul Cercueil, Jonathan Cameron, Dmitry Torokhov, Chris Morgan,
	Andy Shevchenko
  Cc: linux-mips, linux-iio, linux-kernel, linux-input, Artur Rojek

Hi all,

this is a long overdue v2 for fixes [1] related to adc-joystick channel
parsing.

Patch [1/2] now also addresses a case where a readout of ADC data
containing samples for two channels, where only one channel is active,
would push the data into a buffer without discarding the disabled
channel first.

Patch [2/2] addresses concerns about exposure to channels the clients
shouldn't know about. The IIO helpers from v1 are gone and the offsets
are now calculated based only on the channels adc-joystick has access
to.

Tested on GCW Zero (by me) and on Anbernic RG350 (by Paul).

[1] https://lore.kernel.org/all/20220817105643.95710-1-contact@artur-rojek.eu/ 

Cheers,
Artur

Artur Rojek (2):
  iio/adc: ingenic: Fix channel offsets in buffer
  input: joystick: Fix buffer data parsing

 drivers/iio/adc/ingenic-adc.c         |  20 +++--
 drivers/input/joystick/adc-joystick.c | 102 +++++++++++++++++++++++---
 2 files changed, 103 insertions(+), 19 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-05-28 17:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-21 22:58 [PATCH v2 0/2] iio/adc-joystick: buffer data parsing fixes Artur Rojek
2023-05-21 22:59 ` [PATCH v2 1/2] iio/adc: ingenic: Fix channel offsets in buffer Artur Rojek
2023-05-22 10:15   ` Andy Shevchenko
2023-05-22 10:18     ` Andy Shevchenko
2023-05-22 10:23       ` Paul Cercueil
2023-05-22 11:05         ` Andy Shevchenko
2023-05-22 11:35           ` Paul Cercueil
2023-05-22 19:05             ` Andy Shevchenko
2023-05-22 10:20     ` Paul Cercueil
2023-05-22 11:05       ` Andy Shevchenko
2023-05-28 17:49   ` Jonathan Cameron
2023-05-21 22:59 ` [PATCH v2 2/2] input: joystick: Fix buffer data parsing Artur Rojek
2023-05-22 10:58   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).