AnsweredAssumed Answered

AD7992 driver not providing in_voltage_scale

Question asked by alvaro on Jan 18, 2017
Latest reply on Jan 18, 2017 by alvaro

Hi,

 

I'm using AD7992 on a custom board and its Linux driver seems to only partially work. I'm using linux kernel 4.9.4 and I've defined the device tree as follows:

 ad7992_vcc: fixedregulator0 {
    compatible = "regulator-fixed";
    regulator-name = "ad7992_vcc-supply";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };
ad7992_vref: fixedregulator1 {
    compatible = "regulator-fixed";
    regulator-name = "ad7992_vcc-ref";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
};
 axi_iic_0: axi_iic_0@40800000 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "xlnx,xps-iic-2.00.a", "fsl-i2c";
    interrupt-parent = <&microblaze_0_axi_intc>;
    interrupts = <5 0>;
    reg = <0x40800000 0x10000>;
    clocks = <&clk_bus_0 0>;
    clock-frequency = <100000>;
    ad7992@20 {
       compatible = "adi,ad7992";
       reg = <0x20>;
       vcc-supply = <&ad7992_vcc>;
       vref-supply = <&ad7992_vref>;
    };
};

I can read both in_voltage0_raw and in_voltage1_raw, but reading in_voltage_scale fails. Both read values are completely accurate known Vref and the circuit attached to it, so I'm fully certain that the ADC and surrouding circutry is working , and i2c communication is completely ok.

 

Am I doing something wrong?

 

Thanks!

 

# cat in_voltage0_raw
1282
# cat in_voltage1_raw
3554
# cat in_voltage_scale
cat: read error: Invalid argument

Outcomes