AnsweredAssumed Answered

Interfacing AD7495 through IIO Framework

Question asked by shekharlav on Aug 19, 2012
Latest reply on Aug 19, 2012 by Aaronwu

Hi,

 

I am using a ADSP BF527 based board. I am using 2011R1 HEAD distro, with 2011R1-RC4 toolchain.

 

I am trying to interface AD7495 with my board through the IIO Framework.

 

I have followed the instructions given in http://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7476a

 

Both AD7495 and AD7476A use the same driver.

 

But, the above page only talks about interfacing AD7476A. I wanted to confirm the mechanism for interfacing AD7495.

 

I believe that the only the declaration of the SPI slave device needs to be changed in the following manner.

 


static struct spi_board_info board_spi_board_info[] __initdata = {

#if defined(CONFIG_AD7476) || \
     defined(CONFIG_AD7476_MODULE)

{

/* the modalias must be the same as spi device driver name */

.modalias = "ad7495", /* Name of spi_driver for this device */

.max_speed_hz = 1000000,     /* max spi clock (SCK) speed in HZ */

.bus_num = 0, /* Framework bus number */

.chip_select = 3, /* Framework chip select */

.platform_data = NULL,

.controller_data = &ad7476_chip_info, /* Blackfin only */

.mode = SPI_MODE_0,

},

#endif

}

 

Note that only '.modalias' and '.platform_data' have been changed from those given in http://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7476a#declaring_spi_slave_devices;

 

'.platform_data' has been set to 'NULL' since unlike AD7476, AD7495 has an internal Vref.

 

Please confirm the above changes, and let us know if any other modifications/additions need to be made.

 

Regards,

Shekhar

Outcomes