AnsweredAssumed Answered

AD7606 probe function not getting called

Question asked by Ashish-k on Mar 15, 2017
Latest reply on Mar 21, 2017 by larsc

Hi Team ,
I am trying to add support to an "Analog SPI device AD7606" from device tree
so that the driver's "drivers/staging/iio/adc/ad7606_spi.c"
probe function is called ( Apalis iMX6 + IXORA )

Enabled the spi device in arch/arm/boot/dts/imx6qdl-apalis-ixora.dtsi to get
/* Apalis SPI1 */
&ecspi1 {
         status = "okay";
         spidev0: spidev@1 {
               compatible = "toradex,evalspi";
               reg = <0>;
               spi-max-frequency = <18000000>;
            };

              ad7606-8@2 {
                  compatible = "adi,ad7606-8","adi,ad7606-4","adi,ad7606-4";
                   reg = <0>;
                    spi-max-frequency = <18000000>;
               };
};

 

The drive r code to bind the device is
static const struct spi_device_id ad7606_id[] = {
      {"ad7606-8", ID_AD7606_8},
      {"ad7606-6", ID_AD7606_6},
      {"ad7606-4", ID_AD7606_4},
      {}
};
MODULE_DEVICE_TABLE(spi, ad7606_id);

static struct spi_driver ad7606_driver = {
      .driver = {
            .name = "ad7606",
            .owner = THIS_MODULE,
           .pm = AD7606_SPI_PM_OPS,
      },
      .probe = ad7606_spi_probe,
      .remove = ad7606_spi_remove,
      .id_table = ad7606_id,
};

module_spi_driver(ad7606_driver);

Could team please let me know what might be the problem here or if team can please provide any pointers.

Outcomes