Skip to content
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

adi/ad7625: add support for AD762x/AD796x #609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

threexc
Copy link
Contributor

@threexc threexc commented Oct 18, 2024

Description

Add basic support for the AD7625, AD7626, AD7960, and AD7961 ADCs in pyadi-iio. The corresponding driver will be merged in kernel v6.13 and backported to the ADI kernel tree shortly after, so we may not actually want to merge this just yet, but it should be sufficient to review. The driver is available in the iio kernel tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/?h=togreg

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this been tested?

Tested against Zedboard with e.g.:

pytest -v --hw=ad7625 --uri=ip:192.168.40.140 test/test_ad7625.py

and via emulation with:

pytest -v --hw=ad7625 --emu --emu-xml=test/emu/devices/ad7625.xml test/test_ad7625.py

Test Configuration:

  • Hardware: Zedboard + EVAL-AD7626/25FMCZ, Zedboard + EVAL-AD7961FMCZ
  • OS: Kuiper GNU/Linux 11.2 (bullseye) with custom kernel 6.11.0-rc1-ad7625-mainline-00027-g26f7e74e040d

Documentation

Documentation added in doc/source/devices/adi.ad7625.rst

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have signed off all commits and they contain "Signed-off by: "
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules


_device_name = ""
_complex_data = False
_rx_channel_names = ["voltage0-voltage1"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this channel correct? Seems odd

Copy link
Contributor Author

@threexc threexc Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a differential antiphase pair of inputs making up the channel.

Copy link
Collaborator

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally this PR is fine. Just had the question on the channel name(s). Please fix the lint issue. You can ignore the doc link error w.r.t. ez.analog.com

@threexc
Copy link
Contributor Author

threexc commented Oct 30, 2024

@tfcollins by lint issue, do you mean this?

Warning, treated as error: /home/runner/work/pyadi-iio/pyadi-iio/doc/source/devices/adi.ad7625.rst:document isn't included in any toctree

@tfcollins
Copy link
Collaborator

@tfcollins by lint issue, do you mean this?

Warning, treated as error: /home/runner/work/pyadi-iio/pyadi-iio/doc/source/devices/adi.ad7625.rst:document isn't included in any toctree

There was an upstream error that go resolved outside of github. This here needs to be fixed. Each class needs a doc page

@threexc
Copy link
Contributor Author

threexc commented Oct 30, 2024

Should be fixed now. Also rebased on top of latest main branch.

@threexc
Copy link
Contributor Author

threexc commented Nov 26, 2024

Rebased on top of latest main.

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.

2 participants