Because the hardware on our board was soldered wrong way, I want to exchange the SDA and SCL pins of SPI bus 3 on the OMAP3.
What I'm trying now is to use a bit-banging GPIO driver and use it to drive the pins as GPIO.
In the board file I added the following:
static struct i2c_gpio_platform_data my_gpio_i2c_pdata = {
.sda_pin = 184,
.scl_pin = 185,
.udelay = 2, /* 250 KHz */
.timeout = HZ,
};
static struct platform_device maple_gpio_i2c = {
.name = "i2c-gpio",
.id = 2,
.dev = {
.platform_data = &my_gpio_i2c_pdata,
},
};
static int __init ....()
{
...
/* Use bit-bang for I2C bus 3 because the wiring is wrong */
printk(KERN_WARNING "Registering GPIO I2C driver now\n");
if (platform_device_register(&maple_gpio_i2c) != 0)
printk(KERN_WARNING "Failed to register i2c-gpio driver\n");
...
}
I see the "Registering GPIO I2C driver now" output on the kernel console when it boots, no failure message, but no I2C device is created. What did I miss?