I made changes in the machi-mini2440.c file to enable bitbanging SPI
driver. The SPI drivers are loaded as modules.
static struct s3c2410_spigpio_info spi_gpio_cfg = {
.pin_clk = S3C2410_GPG(13),
.pin_mosi = S3C2410_GPG(12),
.pin_miso = S3C2410_GPG(11),
// .chip_select = &spi_gpio_cs,
};
static struct platform_device qt2410_spi = {
.name = "s3c24xx-spi-gpio",
.id = 1,
.dev = {
.platform_data = &spi_gpio_cfg,
},
};
I took this piece of code from mach-s3c2410/mach-qt2410.c.
Also I added the line
&qt2410_spi,
in the platform_device structure.
In the function static void __init mini2440_machine_init(void)
I added the following.
s3c2410_gpio_cfgpin(S3C2410_GPG(2), S3C2410_GPIO_OUTPUT);
s3c2410_gpio_setpin(S3C2410_GPG(2), 0); //CS is always low, as there is
only one SPI IC
// s3c_device_spi0.dev.platform_data = &mini2440_spi0_platdata;
spi_register_board_info(mini2440_spi_board_info,
ARRAY_SIZE(mini2440_spi_board_info));
I am trying to register the MAX7301 SPI expander IC.
The driver is located under drivers/gpio/max7301.c
When the max7301.c calls the
return spi_register_driver(&max7301_driver);
from its init code, the call is not going to the probe function. Nothing
happens. No errors.
What am i missing?

