Skip to content

Commit a834f68

Browse files
committed
iio: adc: adrv9002: add carrier support to debugfs
This allows setting the carrier in debugfs in a way that a subsequent `echo 1 > initialize` will reset the device and it will start with the desired carrier. Signed-off-by: Nuno Sa <nuno.sa@analog.com>
1 parent 6ab118c commit a834f68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/iio/adc/navassa/adrv9002_debugfs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,9 @@ void adrv9002_debugfs_create(struct adrv9002_rf_phy *phy, struct dentry *d)
15321532
debugfs_create_file(attr, 0600, d, &tx->channel, &adrv9002_enablement_delays_fops);
15331533

15341534
adrv9002_debugfs_dpd_config_create(tx, d);
1535+
1536+
sprintf(attr, "tx%d_carrier_hz", chan);
1537+
debugfs_create_u64(attr, 0600, d, &tx->channel.carrier);
15351538
}
15361539

15371540
for (chan = 0; chan < ARRAY_SIZE(phy->rx_channels); chan++) {
@@ -1577,6 +1580,9 @@ void adrv9002_debugfs_create(struct adrv9002_rf_phy *phy, struct dentry *d)
15771580
sprintf(attr, "rx%d_near_end_loopback", chan);
15781581
debugfs_create_file_unsafe(attr, 0200, d, rx,
15791582
&adrv9002_rx_near_end_loopback_set_fops);
1583+
1584+
sprintf(attr, "rx%d_carrier_hz", chan);
1585+
debugfs_create_u64(attr, 0600, d, &rx->channel.carrier);
15801586
}
15811587

15821588
adrv9002_debugfs_fh_config_create(phy, d);

0 commit comments

Comments
 (0)