2010-02-21 23:57:02     Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

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

2010-02-21 23:57:02     Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

Poorna Jyothi (INDIA)

Message: 86287   

 

Hi,

 

I have built kernel for BF527 with Max1233 Touchscreen & Keypad driver included in it. While booting this kernel image I am facing the issue with chip select. The error I am getting is "chip select 2 already in use". The problem is happening as the driver for touchscreen & keypad are separate and they have separate spi initdata in ezkit.c file.Let me know if you have any idea on how to build two drivers for same chip.

 

Thanks,

 

Poorna

QuoteReplyEditDelete

 

 

2010-02-22 04:23:13     Re: Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

Yi Li (CHINA)

Message: 86311   

 

Poorna,

 

Can you assign differect SPI chip select number to your two drivers, in the board file (and your device should connect to correct SPI chip select line correctly).

 

You may refer to e.g arch/blackfin/mach-bf537/boards/stamp.c:

 

static struct spi_board_info bfin_spi_board_info[] __initdata = {

#if defined(CONFIG_MTD_M25P80) \

        || defined(CONFIG_MTD_M25P80_MODULE)

        {

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

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

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

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

                .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/

                .platform_data = &bfin_spi_flash_data,

                .controller_data = &spi_flash_chip_info,

                .mode = SPI_MODE_3,

        },

#endif

 

 

Simply set "chip_select" correctly.

 

-Yi

QuoteReplyEditDelete

 

 

2010-02-22 11:25:40     Re: Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

Robin Getz (UNITED STATES)

Message: 86325   

 

Poorna:

 

Use a different touchscreen/keypad driver - like one from ADI which already has a driver.

 

-Robin

QuoteReplyEditDelete

 

 

2010-02-22 22:42:15     Re: Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

Poorna Jyothi (INDIA)

Message: 86351   

 

Yi Li thank you for the response.

 

I have defined the __initdata as you mentioned. The two drivers I am using are for same chip. So the chip_select for both of them is same. I tried changing chip_select  but it doesn't work. Is there any way  for two drivers to work on single chip, as I am using max1233 for both touchscreen & keypad.

QuoteReplyEditDelete

 

 

2010-02-23 04:32:30     Re: Unable to boot kernel with Max1233 Touchscreen & Keypad driver built

Yi Li (CHINA)

Message: 86371   

 

Poorna,

 

As Robin said, please use a chip which already has a driver, see:   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers

 

-Yi

Attachments

    Outcomes