Hi Guys,
I want add a SPI driver in Linux kernel3.0.8 on my Panda,and i use
below functions in board_omap4panda.c file:
static struct tommy_spi_platform_data tommy_spi_pdata __initdata =
{
.oe_gpio = TOMMY_SPI_OUTPUT_ENABLE,
.oe_inverted = 1,
.pwr_gpio = TOMMY_SPI_PWR,
.irq_flags = 0 /* use default flags in the driver */
static struct spi_board_info tommy_spi_devices[] __initdata = {
{
.modalias = "tommy_spi",
.bus_num = 1, //use spi1 bus
.chip_select = 0,
.mode = SPI_MODE_0,
.max_speed_hz = 10000000,
.platform_data = &tommy_spi_pdata,
.irq = 0, /* will be calculated later */
},
static void __init register_tommy_spi_devices(void)
{
printk("<0>" "Tommy:In the function: %s!!!\n", __FUNCTION__);
tommy_spi_devices[0].irq = gpio_to_irq(TOMMY_SPI_INT);
spi_register_board_info(tommy_spi_devices,
ARRAY_SIZE(tommy_spi_devices));
static void __init omap4_panda_init(void)
{
......
omap4_panda_display_init();
printk("<0>""Tommy SPI Driver Register~");
init_tommy_mux_io(); //add for tommy tp control gpio init
register_tommy_spi_devices();
if (cpu_is_omap446x()) {
......
This method is OK in linux kernel2.6.35,but linux kernel3.0.8. I
registered SPI driver successfuly ,but when i test the SPI signal use
oscilloscope,there is no SPI signal out like CLK ,SIMO. But all signal
out is OK in kernel2.6.35.
What is the problem?Please help me ~
Thanks
Tommy