diff --git a/Documentation/devicetree/bindings/iio/frequency/hmc7044.txt b/Documentation/devicetree/bindings/iio/frequency/hmc7044.txt index 721635977f5ae2..f479e6b8ead014 100644 --- a/Documentation/devicetree/bindings/iio/frequency/hmc7044.txt +++ b/Documentation/devicetree/bindings/iio/frequency/hmc7044.txt @@ -70,6 +70,9 @@ Adding channels: - adi,high-performance-mode-disable: Disables the high performance mode - adi,startup-mode-dynamic-enable: Enables pulse generator mode (default mode is asynchronous) + - adi,dynamic-driver-enable: Driver is dynamically disabled with pulse + generator events. (only in adi,startup-mode-dynamic-enable mode) + (default driver is enabled/disabled with the channel) - adi,force-mute-enable: When not generating pulses in dynamic mode the output is forced to logic-0 - adi,coarse-digital-delay: Adjusts the phase of the divider signal diff --git a/arch/microblaze/boot/dts/adi-dual-ad9208.dtsi b/arch/microblaze/boot/dts/adi-dual-ad9208.dtsi index 25e42db6f25913..a7da330ab08a6b 100644 --- a/arch/microblaze/boot/dts/adi-dual-ad9208.dtsi +++ b/arch/microblaze/boot/dts/adi-dual-ad9208.dtsi @@ -49,6 +49,7 @@ adi,driver-mode = ; // LVDS adi,startup-mode-dynamic-enable; adi,high-performance-mode-disable; + adi,dynamic-driver-enable; }; hmc7044_c2: channel@2 { reg = <2>; @@ -63,6 +64,7 @@ adi,driver-mode = ; // LVDS adi,startup-mode-dynamic-enable; adi,high-performance-mode-disable; + adi,dynamic-driver-enable; }; hmc7044_c8: channel@8 { reg = <8>; @@ -83,6 +85,7 @@ adi,driver-mode = ; // LVDS adi,startup-mode-dynamic-enable; adi,high-performance-mode-disable; + adi,dynamic-driver-enable; }; hmc7044_c11: channel@11 { reg = <11>; @@ -91,6 +94,7 @@ adi,driver-mode = ; // LVDS adi,startup-mode-dynamic-enable; adi,high-performance-mode-disable; + adi,dynamic-driver-enable; }; }; diff --git a/drivers/iio/frequency/hmc7044.c b/drivers/iio/frequency/hmc7044.c index d8af6eab179d72..11aa054926cfc2 100644 --- a/drivers/iio/frequency/hmc7044.c +++ b/drivers/iio/frequency/hmc7044.c @@ -234,6 +234,8 @@ struct hmc7044_chan_spec { bool disable; bool high_performance_mode_dis; bool start_up_mode_dynamic_enable; + bool dynamic_driver_enable; + bool output_control0_rb4_enable; bool force_mute_enable; unsigned int divider; unsigned int driver_mode; @@ -901,7 +903,7 @@ static int hmc7044_setup(struct iio_dev *indio_dev) hmc7044_write(indio_dev, HMC7044_REG_CH_OUT_CRTL_8(chan->num), HMC7044_DRIVER_MODE(chan->driver_mode) | HMC7044_DRIVER_Z_MODE(chan->driver_impedance) | - (chan->start_up_mode_dynamic_enable ? + (chan->dynamic_driver_enable ? HMC7044_DYN_DRIVER_EN : 0) | (chan->force_mute_enable ? HMC7044_FORCE_MUTE_EN : 0)); @@ -916,6 +918,7 @@ static int hmc7044_setup(struct iio_dev *indio_dev) hmc7044_write(indio_dev, HMC7044_REG_CH_OUT_CRTL_0(chan->num), (chan->start_up_mode_dynamic_enable ? HMC7044_START_UP_MODE_DYN_EN : 0) | + (chan->output_control0_rb4_enable ? BIT(4) : 0) | (chan->high_performance_mode_dis ? 0 : HMC7044_HI_PERF_MODE) | HMC7044_SYNC_EN | HMC7044_CH_EN); @@ -1086,6 +1089,12 @@ static int hmc7044_parse_dt(struct device *dev, hmc->channels[cnt].start_up_mode_dynamic_enable = of_property_read_bool(chan_np, "adi,startup-mode-dynamic-enable"); + hmc->channels[cnt].dynamic_driver_enable = + of_property_read_bool(chan_np, + "adi,dynamic-driver-enable"); + hmc->channels[cnt].output_control0_rb4_enable = + of_property_read_bool(chan_np, + "adi,control0-rb4-enable"); hmc->channels[cnt].force_mute_enable = of_property_read_bool(chan_np, "adi,force-mute-enable");