Skip to content

Commit

Permalink
iio: adc: adrv9002_debugfs: add port swich debug interface
Browse files Browse the repository at this point in the history
Allow to configure RX port switch frequency ranges at runtime. Note that
when port switching is set to manual mode, no interfaces are exposed.
One also needs to re-initialize the device for the new values to take
effect.

Signed-off-by: Nuno Sá <[email protected]>
  • Loading branch information
nunojsa committed Jan 28, 2025
1 parent 5547b3a commit 45b5413
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/iio/adc/navassa/adrv9002_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,18 @@ void adrv9002_debugfs_create(struct adrv9002_rf_phy *phy, struct dentry *d)

debugfs_create_u32("dev_clkout_div", 0600, d, &phy->dev_clkout_div);

/* port switch */
if (phy->port_switch.enable && !phy->port_switch.manualRxPortSwitch) {
debugfs_create_u64("rx_port_a_min_carrier_hz", 0600, d,
&phy->port_switch.minFreqPortA_Hz);
debugfs_create_u64("rx_port_a_max_carrier_hz", 0600, d,
&phy->port_switch.maxFreqPortA_Hz);
debugfs_create_u64("rx_port_b_min_carrier_hz", 0600, d,
&phy->port_switch.minFreqPortB_Hz);
debugfs_create_u64("rx_port_b_max_carrier_hz", 0600, d,
&phy->port_switch.maxFreqPortB_Hz);
}

for (chan = 0; chan < phy->chip->n_tx; chan++) {
struct adrv9002_tx_chan *tx = &phy->tx_channels[chan];

Expand Down

0 comments on commit 45b5413

Please sign in to comment.