Skip to content

adc-joystick: add poll-interval

Chris Morgan linux-iio linux-input 12 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v13 Latest3 patches 1 replyApplied
  2. v123 patches 4 repliesSuperseded
  3. v113 patches 0 repliesSuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v103 patches4 repliesSuperseded
v93 patches1 replySuperseded
v83 patches3 repliesSuperseded
v73 patches5 repliesSuperseded
v63 patches2 repliesSuperseded
v53 patches1 replySuperseded
v43 patches6 repliesSuperseded
v33 patches11 repliesSuperseded
v23 patches9 repliesSuperseded

Changes in v13 from the cover letter

- Refactor for 6.0 kernel. This required changing the return routine slightly for the probe function as the input device registration has moved.
- Modified error handling for checking the "poll-interval" property.

Patches in v13 Applied

#Subject and filesSizeRepliesApplied
1/3dt-bindings: adc-joystick: add poll-intervalDocumentation/devicetree/bindings/input/adc-joystick.yaml+5 -00 replies
2/3input: adc-joystick - Add polled input device supportdrivers/input/joystick/adc-joystick.c+45 -30 replies
3/3arm64: dts: rockchip: Update joystick to polled for OG2arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts+1 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRob HerringArtur Rojek
1/3R-b A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v13 thread

Cover letter [PATCH v13 0/3] adc-joystick: add poll-interval

From: Chris Morgan <[email protected]>

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 <[email protected]>.

Changes from V12:
- Refactor for 6.0 kernel. This required changing the return routine slightly for the probe function as the input device registration has moved.
- Modified error handling for checking the "poll-interval" property.

Changes from V11:
- Remove additional unnecessary line breaks.

Changes from V10:
- Removed two unnecessary line breaks.

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         | 48 +++++++++++++++++--
 3 files changed, 51 insertions(+), 3 deletions(-)
Signature · 1 line
2.25.1