I've been trying to create a bitbanged spi interface for the AT91SAM9263ek evaluation card, I'm using the spi_at91_bitbang.c driver, and removed the check for SPI0 bus.
The problem is when i try to modprobe the driver, it will not enter the probe function, do i need to add the platform driver to the architecture?? What would this look like??
I've noticed the spi definitions in at91sam9263_devices.c and tried to adapt this and insert a new block in board_at91sam9263.c, I.e a platform_device struct and anoher init_device_spi which runs the platform_device_register function
#-# SNIP // E1219A SPI Bitbang #if defined(CONFIG_SPI_AT91E1219A)
static struct platform_device e1219a_spi_dev = { .name = "at91e1219a_lcd_spi", .id = 2, };
static void __init e1219a_add_device_spi(struct e1219a_spi_dev
*devices, int nr_devices) { platform_device_register(&e1219a_spi_dev); } #else void __init e1219a_add_device_spi(struct e1219a_spi_dev *devices,int nr_devices) {} #endif#-# SNIP
and further down in ek_board_init
/* SPI */ at91_set_gpio_output(AT91_PIN_PE20, 1); /* select spi0 clock */ at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); e1219a_add_device_spi(e1219a_spi_devices, ARRAY_SIZE(e1219a_spi_devices));
But the SPI driver will not enter the probe function
This is the struct from the master spi driver source, which utilizes the spi_bitbang routines
static struct platform_driver at91e1219a_spi_driver = { .probe = at91e1219a_spi_probe, .remove = __devexit_p(at91e1219a_spi_remove), .driver = { .name = "at91e1219a_lcd_spi", .owner = THIS_MODULE, }, };