iio: adc: adrv902x: add init cal and status attrs - #3526
Open
RaulGeo289 wants to merge 2 commits into
Open
RaulGeo289 wants to merge 2 commits into
RaulGeo289 wants to merge 2 commits into
Conversation
RaulGeo289
requested review from
CiprianRegus,
amiclaus,
btogorean,
buha,
chegbeli,
danmois,
dbogdan,
machschmitt,
mhennerich,
nunojsa,
rbolboac and
stefpopa
as code owners
September 8, 2026 09:09
RaulGeo289
force-pushed
the
staging/initial_calibrations_madura
branch
from
September 8, 2026 09:10
d8550db to
3656416
Compare
RaulGeo289
marked this pull request as draft
September 8, 2026 09:10
RaulGeo289
marked this pull request as ready for review
September 8, 2026 10:31
stefpopa
requested changes
Sep 11, 2026
stefpopa
left a comment
Collaborator
There was a problem hiding this comment.
A few minor comments from my side.
RaulGeo289
force-pushed
the
staging/initial_calibrations_madura
branch
2 times, most recently
from
September 18, 2026 10:05
d8e8c59 to
4086a57
Compare
Expose the init calibration status readbacks through sysfs so a run can be inspected from userspace without a debugger. New read-only status attributes: init_cals_complete_check adi_adrv9025_InitCalsCheckCompleteGet() init_cals_all_status adi_adrv9025_InitCalsDetailedStatusGet() Both are registered for adrv9026 and adrv9029. While here, propagate the error code from adrv9025_dev_err() at the two existing call sites in adrv9025_phy_write_raw() that dropped it and returned the raw ADI status instead of an errno. Signed-off-by: Georgian Raul <Raul.Georgian@analog.com>
Add tracking_cals_all_status, a read-only sysfs attribute backed by adi_adrv9025_TrackingCalAllStateGet(), so the per-channel tracking calibration states and the aggregate calError can be read from userspace without a debugger. Add four more calibration enables, each setting its bit in the mask run by adi_adrv9025_InitCalsRun(): calibrate_orx_qec_en ADI_ADRV9025_ORX_QEC_INIT calibrate_orx_lo_delay_en ADI_ADRV9025_ORX_LO_DELAY calibrate_adc_en ADI_ADRV9025_ADC_TUNER calibrate_orx_adc_en ADI_ADRV9025_ORX_TIA All five are registered for adrv9026 and adrv9029. Signed-off-by: Georgian Raul <Raul.Georgian@analog.com>
RaulGeo289
force-pushed
the
staging/initial_calibrations_madura
branch
from
September 18, 2026 10:39
4086a57 to
f6c457c
Compare
Collaborator
Author
|
Changelog v1: |
This branch has not been deployed
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.
This PR implements the initial calibration IIO attributes and the
status functions for both initial and tracking calibrations.
adi_adrv9025_InitCalsDetailedStatusGet() gives the error code, how
many microseconds the last calibration took, what ran last time,
and what calibrations ran since power up. The last two are
per-channel bitmasks, decoded against
adi_adrv9025_InitCalibrations_e, which can be found in
adi_adrv9025_cals_types.h.
adi_adrv9025_TrackingCalAllStateGet() gives a 32-bit mask with one
bit per calibration instance, flagging which ones are in the error
state, plus the state of each of the 32 tracking calibrations
(8 types across 4 channels).
adi_adrv9025_InitCalsCheckCompleteGet() can be used to verify if
the init calibrations are completed. It returns a running flag,
which is 0 when the ARM has completed the calibrations or never
ran them and 1 while they are currently running, and separately a
3-bit ARM error code.
When the calibration is successful, the error code should always
be 0.
PR Type
PR Checklist