This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/ADS8688: Linux/ADS8688:

Part Number: ADS8688


Tool/software: Linux

I want to register ads 8688 linux driver from kernel machine file (arch/arm/mach-mx6/board-xxxxx). 

I have tried below but do device tree is created under /sys/bus/iio/device nor probe function is called. 

static struct spi_board_info imx6_pac_spi_nor_device[] __initdata = {

#if defined(CONFIG_MTD_M25P80)
{
.modalias = "m25p80",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0,
.chip_select = 0,
.platform_data = &imx6_celp__spi_flash_data,
},
#endif
{
.modalias = "spidev",
.max_speed_hz = 20000000, //20Mhz
.bus_num = 4,
.chip_select = 0,
.mode = SPI_MODE_0,
},
{
.modalias = "spidev",
.max_speed_hz = 20000000, //20Mhz
.bus_num = 3,
.chip_select = 0,
.mode = SPI_MODE_0,
},
#if defined(CONFIG_TI_ADS8688)
{
.modalias = "ads8688",
.max_speed_hz = 100000,
.bus_num = 1,
.chip_select = 0,
.mode = SPI_MODE_1,
},
#endif
};

does anyone have sample on how to register the ads8688 on machine file ?

  • Hello John,

    Unfortunately we do not have sample code to help with this.

    I would suggest focusing on one register at a time, write to the register, then after, read the same register to confirm that you wrote to it correctly. From here you can continue to develop the needed register content.

    Also, Figure 72 and subsequent steps in the datasheet help explain how to write to the registers and convert/acquire data.

    On page 45 of the datasheet register set up begins to be explained, this might be helpful to look over. The below table can be found on page 46 goes into detail on the timing for register configuration. Timing a common issue with dealing with digital communications.

    Regards, Cynthia