ad4080: add AD4880/AD4883/AD4884 dual-channel support - #790
Open
amiclaus wants to merge 2 commits into
Open
Conversation
ad4080_channel.scale read a hardcoded "voltage0" and therefore returned channel 0's scale for every channel. Use the actual channel name so each channel reports its own scale. Fixes: 4791340 ("ad4080: add pyadi-iio support") Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
The ad4080 kernel driver gained support for the dual-channel AD4880, AD4883 and AD4884 parts. Add them to compatible_parts so they can be instantiated through the adi.ad4080 class. Unlike the single-channel AD4080-AD4088 parts, where filter_type, oversampling_ratio and sampling_frequency are device-level attributes, these dual-channel parts expose those attributes per channel (voltage0 and voltage1). Add the corresponding per-channel properties to the ad4080_channel class so each channel can be configured independently, while leaving the existing device-level properties in place for the single-channel parts. Add an ad4883 example demonstrating the dual-channel configuration and capture readout. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Test Results2 244 tests ±0 943 ✅ - 1 4m 44s ⏱️ -1s For more details on these failures, see this check. Results for commit b4dbd84. ± Comparison against base commit 1e50f3a. ♻️ This comment has been updated with latest results. |
|
Generated documentation for this PR is available at Link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The ad4080 kernel driver gained support for the dual-channel AD4880,
AD4883 and AD4884 parts. Add them to compatible_parts so they can be
instantiated through the adi.ad4080 class.
Unlike the single-channel AD4080-AD4088 parts, where filter_type,
oversampling_ratio and sampling_frequency are device-level attributes,
these dual-channel parts expose those attributes per channel (voltage0
and voltage1). Add the corresponding per-channel properties to the
ad4080_channel class so each channel can be configured independently,
while leaving the existing device-level properties in place for the
single-channel parts.
Add an ad4883 example demonstrating the dual-channel configuration and
capture readout.
Type of change
How has this been tested?
real hardware
python3 -m pytest -k ad4080 --adi-hw-map):Test configuration
Documentation
doc/source/New device class interfaces
Skip this section if the PR does not add a new device class.
adi.device_base(rx_chan_comp,tx_chan_comp, or a_no_buffvariant). If not, explain why in the description. See the Device Base Classes developer doc page.compatible_partslists every part number this class supportssupported_parts.md(verify withinvoke checkparts)test/emu/and referenced from a testChecklist
invoke precommitpasses locallySigned-off-by: Name <email>)