projects: ad9361: add getter for TX sampling frequency#3100
Open
cristina-suteu wants to merge 3 commits into
Open
projects: ad9361: add getter for TX sampling frequency#3100cristina-suteu wants to merge 3 commits into
cristina-suteu wants to merge 3 commits into
Conversation
cristina-suteu
requested review from
CiprianRegus,
RaduSabau1,
amiclaus,
buha,
danmois,
dbogdan,
raezt,
ralucabozdog,
ranechita,
rbolboac,
rbudai98 and
stefpopa
as code owners
May 18, 2026 11:56
cristina-suteu
force-pushed
the
ad9361-fix-tx-sampl-freq
branch
from
May 18, 2026 12:02
db5b65d to
ea84971
Compare
amiclaus
requested changes
May 19, 2026
amiclaus
left a comment
Contributor
There was a problem hiding this comment.
some comments on my side.
| if (!phy || !sampling_freq_hz) | ||
| return -EINVAL; | ||
|
|
||
| freq = (uint32_t)clk_get_rate(phy, phy->ref_clk_scale[TX_SAMPL_CLK]); |
Contributor
There was a problem hiding this comment.
isn't the return type of clk_get_rate uint32_t?
| * @param dev - The AXI DAC device (unused, uses global ad9361_phy). | ||
| * @param chan - Channel number (unused, AD9361 has single RX sample rate). | ||
| * @param sampling_freq_hz - Output sampling frequency in Hz. | ||
| * @return 0. |
| /** | ||
| * @brief Get TX sampling frequency callback for iio_axi_dac. | ||
| * @param dev - The AXI DAC device (unused, uses global ad9361_phy). | ||
| * @param chan - Channel number (unused, AD9361 has single RX sample rate). |
| iio_axi_dac_init_par = (struct iio_axi_dac_init_param) { | ||
| .tx_dac = ad9361_phy->tx_dac, | ||
| .tx_dmac = tx_dmac, | ||
| .get_sampling_frequency = ad9361_iio_axi_dac_get_sampling_freq, |
Contributor
There was a problem hiding this comment.
do we even have get_sampling_frequency in axi_dac_init_param? I see it only in axi_adc
added sampling frequency getter implementation if a project implements a custom sampling freq getter, that will be used if not, an error code is returned as before Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
add error handling for ad9361_get_tx_sampling_freq Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added sampling frequency getter to make sure the correct sampling frequency is read by tx_dac devices Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
cristina-suteu
force-pushed
the
ad9361-fix-tx-sampl-freq
branch
from
July 13, 2026 04:11
ea84971 to
afc7c48
Compare
Collaborator
Author
|
v2:
|
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.
Pull Request Description
This ensures that the correct value for sampling frequency is read by tx_dac devices.
PR Type
PR Checklist