linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/3] dt-bindings: adc-joystick: add poll-interval
@ 2022-07-21 16:46 Chris Morgan
  2022-07-21 16:46 ` [PATCH v8 1/3] " Chris Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chris Morgan @ 2022-07-21 16:46 UTC (permalink / raw)
  To: linux-input
  Cc: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt, heiko, contact,
	jic23, paul, linux-iio, 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 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         | 82 ++++++++++++++-----
 3 files changed, 68 insertions(+), 20 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2022-08-03 16:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 16:46 [PATCH v8 0/3] dt-bindings: adc-joystick: add poll-interval Chris Morgan
2022-07-21 16:46 ` [PATCH v8 1/3] " Chris Morgan
2022-07-21 16:46 ` [PATCH v8 2/3] Input: adc-joystick - Add polled input device support Chris Morgan
2022-07-28 20:26   ` Artur Rojek
2022-07-29 16:30     ` Chris Morgan
     [not found]     ` <20220729163048.GA123@wintermute.localdomain>
2022-08-03 16:53       ` Chris Morgan
2022-07-21 16:46 ` [PATCH v8 3/3] arm64: dts: rockchip: Update joystick to polled for OG2 Chris Morgan

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).