AnsweredAssumed Answered

AD7766 linux driver

Question asked by DerekJones on May 29, 2016
Latest reply on Jun 13, 2016 by larsc

Hi,

I am attempting to get the Analog Devices AD7766 driver working on a Humming Board (quad imx6). From the device tree sample that I was given, I am assuming that the AD7766 /DRDY is connected to a GPIO and that interrupts from this GPIO are hooked into the AD7766 driver interrupt handler. Am I correct in this assumption?

 

I am new to Linux device trees and am having trouble figuring out how the GPIO is configured as an input and hooked up to the interrupt handler in the GPIO code. Any help would be appreciated.

 

Here is my device tree setup for the ADC.

 

&ecspi2 {
        fsl,spi-num-chipselects = <1>;
        cs-gpios = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hummingboard_ecspi2>;
status = "okay";

        adc: adc@0 {
            compatible = "adi,ad7766";
            reg = <0>;
            spi-max-frequency = <10000000>;
            spi-cpol;
            spi-cpha;

            /* /DRDY is on GPIO bank 3, IO 8 (pin 12) */
            interrupt-parent = <&gpio3>;
            interrupts = <8 IRQ_TYPE_EDGE_FALLING>;

            clocks = <&mclk>;
            clock-names = "mclk";

            vref-supply=<&vref>;

            /* /SYNC is on GPIO bank 3, IO 9 (pin 11) */
            powerdown-gpio = <&gpio3 9 GPIO_ACTIVE_LOW>;
        };
};

The device driver probe is called and executes without errors. However, I don't get interrupts.

Outcomes