All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/3] dt-bindings: adc-joystick: add poll-interval
@ 2022-08-03 17:45 Chris Morgan
  2022-08-03 17:45 ` [PATCH v10 1/3] " Chris Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chris Morgan @ 2022-08-03 17:45 UTC (permalink / raw)
  To: linux-input
  Cc: linux-iio, dmitry.torokhov, contact, robh+dt,
	krzysztof.kozlowski+dt, heiko, jic23, paul, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support to the existing adc-joystick driver to support polling
rather than relying on triggered buffers. This is useful for devices
that do not offer triggered buffers in hardware. Code adapted from
changes made by Maya Matuszczyk <maccraft123mc@gmail.com>.

Changes from V9:
 - Simplified skipping of channel checking logic.
 - Simplified return logic for driver probe.

Changes from V8:
 - Changed logic for checking channels to skip checking of storagebits.
 - Changed comment format to comply with Linux style rules.

Changes from V7:
 - Dropped acks from adc-joystick.c changes, as it has been altered
   somewhat since v7.
 - Improved checking value of poll-interval to ensure explicit error
   handling in the event of malformed values.
 - Adjusted logic to not check for storagebits if polling is in use,
   which allows adc-joystick to work in polling mode for devices that
   utilize a mux (such as the Odroid Go Super and the Anbernic RG353).
 - Changed error message and channel size comparison logic slightly to
   ensure code can fit within 80 character column width.

Changes from V6:
 - Reverted back to "poll-interval" after mailing list discussion.
 - Referenced input.yaml for definition of poll-interval in adc-joystick
   documentation.

Changes from V5:
 - Corrected an error found by yamllint in the documentation.

Changes from V4:
 - Added unit property to devicetree attribute making it now
   "poll-interval-ms".
 - Simplified logic for setting polled value and made variable names
   more clear.

Changes from V3:
 - After lengthy discussion decided to support with existing attribute
   of "poll-interval". If present, the driver will use polling and if
   not present, it will use triggered buffers (as the driver does
   today).
 - Corrected some lines to honor the 80 character line-limit.
 - Check return value from polling method and return early if there
   is an error reading the data.

Changes from V2:
 - Changed parameter from "adc-joystick,polled" to
   "adc-joystick,no-hardware-trigger" as it is more representative of
   what the driver and hardware are doing.

Changes from V1:
 - Removed driver compatible string of "adc-joystick-polled".
 - Added new optional boolean value of "adc-joystick,polled".
 - Cleaned up if statements regarding polling behavior.

Chris Morgan (3):
  dt-bindings: adc-joystick: add poll-interval
  Input: adc-joystick - Add polled input device support
  arm64: dts: rockchip: Update joystick to polled for OG2

 .../bindings/input/adc-joystick.yaml          |  5 ++
 .../boot/dts/rockchip/rk3326-odroid-go2.dts   |  1 +
 drivers/input/joystick/adc-joystick.c         | 53 ++++++++++++++++---
 3 files changed, 53 insertions(+), 6 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2022-08-04 18:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 17:45 [PATCH v10 0/3] dt-bindings: adc-joystick: add poll-interval Chris Morgan
2022-08-03 17:45 ` [PATCH v10 1/3] " Chris Morgan
2022-08-03 17:45 ` [PATCH v10 2/3] Input: adc-joystick - Add polled input device support Chris Morgan
2022-08-03 18:03   ` Artur Rojek
2022-08-04 18:40     ` Chris Morgan
2022-08-04 18:52       ` Artur Rojek
2022-08-04 18:56         ` Chris Morgan
2022-08-03 17:45 ` [PATCH v10 3/3] arm64: dts: rockchip: Update joystick to polled for OG2 Chris Morgan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.