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.

Accelerometer Spi issue on dm814x.

Hi ,

Am using dm814x customized board , where my accelerometer is on spi bus 2, but during kernel boot am not getting any message from accelerometer driver as such showing the sensor type and other probe information from lis3lv02d_spi driver.

and also sys entry is also not created.

Accelerometer used is LIS331DLH.

am enabling the driver from : menuconfig -----> drivers----->hwmon ------> (*) STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)

In Board code : i had written :

***********************************************************************************************************************

static struct lis3lv02d_platform_data lis3lv02d_spi_pdata = {
         .click_flags    = LIS3_CLICK_SINGLE_X |
                           LIS3_CLICK_SINGLE_Y |
                           LIS3_CLICK_SINGLE_Z,
         .irq_cfg        = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK,
         .wakeup_flags   = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI |
                           LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI |
                           LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI,

         .wakeup_thresh  = 10,
        .click_thresh_x = 10,
        .click_thresh_y = 10,
        .click_thresh_z = 10,

};

struct spi_board_info __initdata  ti8148_spi_slave_info[] = {

        {
                .modalias       = "lis3lv02d_spi",
                .platform_data  = &lis3lv02d_spi_pdata,
               // .irq            = ,
                .max_speed_hz   = 1000000,
                .bus_num        = 2,
                .chip_select    = 0,
        //      .mode           = SPI_MODE_0
        }
};

void __init  ti8148_spi_init(void)
{
        printk("ROH ::: IN SPI INIT\n");
        spi_register_board_info(ti8148_spi_slave_info,
                                ARRAY_SIZE(ti8148_spi_slave_info));
}

**********************************************************************************************************************

Can anyone comment on this issue ?

Thanks n Regards

ROHIT SHanbhag