2011-04-21 04:34:34     7301_GPIO-Expander_issue_in-bf537

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-04-21 04:34:34     7301_GPIO-Expander_issue_in-bf537

Ganesh krish (INDIA)

Message: 100070   

 

Hi !,

 

   I'm using max7301 chip as GPIO expander

 

   In board file i have added the following lines

 

#if defined(CONFIG_GPIO_MAX7301)

#include <linux/spi/max7301.h>

static struct max7301_platform_data max7301_gpio_data = {

    .base = 49,

};

#endif

 

static struct spi_board_info bfin_spi_board_info[] __initdata = {

 

#if defined(CONFIG_GPIO_MAX7301)

    {

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

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

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

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

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

        .platform_data = &max7301_gpio_data,

    },

#endif

 

wheather preceded changes correct ?

 

where I'm going wrong

QuoteReplyEditDelete

 

 

2011-04-21 05:05:49     Re: 7301_GPIO-Expander_issue_in-bf537

Mike Frysinger (UNITED STATES)

Message: 100078   

 

sorry, but we dont support the max7301 part.  please seek help from Maxim.

QuoteReplyEditDelete

 

 

2011-04-25 04:53:09     Re: 7301_GPIO-Expander_issue_in-bf537

Shyam sundar (INDIA)

Message: 100142   

 

Hello Mike,

 

But in the driver source I do see code for max7301.

 

Even I have tried out the same parameters in the board file

 

#if defined(CONFIG_GPIO_MAX7301)

#include <linux/spi/max7301.h>

static struct max7301_platform_data max7301_gpio_data = {

    .base = 49,

};

#endif

 

static struct spi_board_info bfin_spi_board_info[] __initdata = {

 

#if defined(CONFIG_GPIO_MAX7301)

    {

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

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

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

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

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

        .platform_data = &max7301_gpio_data,

    },

#endif

 

When I boot kernel, I dont see any device added to the device list.

 

Can you please help out?

QuoteReplyEditDelete

 

 

2011-04-25 05:52:52     Re: 7301_GPIO-Expander_issue_in-bf537

Aaron Wu (CHINA)

Message: 100143   

 

What do you mean by "dont see any device added to the device list"? The spi core code will scan the spi_board_info to retrive your part information and alloc/initialize related structure for it, then the max7301 driver can setup and work on the created spi_device. If you have problem on max7301 driver you can check if it's successfully probed. ADI does not support max7301 driver, it's there in the Linux tree by another vendor.

QuoteReplyEditDelete

 

 

2011-04-25 12:19:07     Re: 7301_GPIO-Expander_issue_in-bf537

Mike Frysinger (UNITED STATES)

Message: 100146   

 

the kernel contains a lot of code we did not write.  it doesnt mean we support it.  once again, please seek assistance from Maxim, or use an ADI part and then we'll gladly assist.

Attachments

    Outcomes