Skip to content

[RFC PATCH v3] iio: repeat channel support and dummy client example #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

lucasrangit
Copy link
Contributor

iio_chan_type IIO_ROT uses the repeat channel iio_chan_spec.scan_type.repeat to store repeated elements in a channel without modifiers.

This patch series adds support to libiio and creates a new example tool that exercises the iio_dummy driver. For testing this series the iio_dummy can be patched to include the IIO_ROT channel. See lucasrangit/linux-iio#1 .

Signed-off-by: Lucas Magasweran [email protected]


Changes since v1:

  • tests: iio_info: compared format->repeat > 1 for consistent output and avoid duplicated printf
  • examples: dummy: remove debug print of scan channel size and repeat count
    and squashed commits since this is a new sample tool
  • added missing Signed-off-by to commits

Changes since v2:

  • iio: moved channel repeat to iio-private.h struct iio_channel from iio.h struct iio_data_format because changing it breaks the ABI
  • examples: dummy: updated to use new repeat api
  • tests: iio_info: updated to use new repeat api

Linux struct iio_chan_spec supports a 'repeat' scan_type attribute that
represents the number of times the element repeats.

Value is kept private to avoid breaking the ABI.

Note that a value of 0 and 1 signifies no repeat.

Signed-off-by: Lucas Magasweran <[email protected]>
This matches the optional X%u repeat count in sysfs _type scan element
format attribute.

Signed-off-by: Lucas Magasweran <[email protected]>
@lucasrangit
Copy link
Contributor Author

Closing. Keeping repeat in struct iio_data_format (see #40 ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant