[PATCH 10/16] iio: frequency: ad9523: drop unused channel options

From: Nuno Sá

Date: Mon Nov 30 2026 - 12:38:34 EST


Most of the channel options are only available through platform data,
which has no users:

- ignoring the SYNC signal and the lower power mode of the output
driver.
- the clock source, the divider, the phase and whether the output is
enabled. The driver selects the clock source when the channel
frequency is set, and the frequency, phase and enable can all be set
at runtime.

So drop these options. All channels now start powered down, from the M1
divider and with the divider and phase power-up defaults.

Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
---
drivers/iio/frequency/ad9523.c | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index bf6954e8c099..66083af2be4e 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -264,28 +264,14 @@ enum outp_drv_mode {
*
* @channel_num: Output channel number.
* @divider_output_invert_en: Invert the polarity of the output clock.
- * @sync_ignore_en: Ignore chip-level SYNC signal.
- * @low_power_mode_en: Reduce power used in the differential output modes.
- * @use_alt_clock_src: Channel divider uses alternative clk source.
- * @output_dis: Disables, powers down the entire channel.
* @driver_mode: Output driver mode (logic level family).
- * @divider_phase: Divider initial phase after a SYNC. Range 0..63
- * LSB = 1/2 of a period of the divider input clock.
- * @channel_divider: 10-bit channel divider.
* @extended_name: Optional descriptive channel name.
*/

struct ad9523_channel_spec {
unsigned int channel_num;
bool divider_output_invert_en;
- bool sync_ignore_en;
- bool low_power_mode_en;
- /* CH0..CH3 VCXO, CH4..CH9 VCO2 */
- bool use_alt_clock_src;
- bool output_dis;
enum outp_drv_mode driver_mode;
- unsigned char divider_phase;
- unsigned short channel_divider;
char extended_name[16];
};

@@ -1000,24 +986,22 @@ static int ad9523_setup(struct iio_dev *indio_dev)
chan = &cfg->channels[i];
if (chan->channel_num < AD9523_NUM_CHAN) {
__set_bit(chan->channel_num, &active_mask);
+ /*
+ * The output starts powered down, with the divider and
+ * phase power-up defaults. They are set at runtime.
+ */
ret = ad9523_write(indio_dev,
AD9523_CHANNEL_CLOCK_DIST(chan->channel_num),
AD9523_CLK_DIST_DRIVER_MODE(chan->driver_mode) |
- AD9523_CLK_DIST_DIV(chan->channel_divider) |
- AD9523_CLK_DIST_DIV_PHASE(chan->divider_phase) |
- (chan->sync_ignore_en ?
- AD9523_CLK_DIST_IGNORE_SYNC_EN : 0) |
+ AD9523_CLK_DIST_DIV(32) |
+ AD9523_CLK_DIST_DIV_PHASE(1) |
(chan->divider_output_invert_en ?
AD9523_CLK_DIST_INV_DIV_OUTPUT_EN : 0) |
- (chan->low_power_mode_en ?
- AD9523_CLK_DIST_LOW_PWR_MODE_EN : 0) |
- (chan->output_dis ?
- AD9523_CLK_DIST_PWR_DOWN_EN : 0));
+ AD9523_CLK_DIST_PWR_DOWN_EN);
if (ret < 0)
return ret;

- ret = ad9523_vco_out_map(indio_dev, chan->channel_num,
- chan->use_alt_clock_src);
+ ret = ad9523_vco_out_map(indio_dev, chan->channel_num, 0);
if (ret < 0)
return ret;


--
2.56.0