Platform device initialization
Hello!
I'm writing module for new SPI master device, and I have some strange problem during probing. Exactly, it looks that probe function even doesn't called.
static int spi_gpio_cs_probe(struct platform_device* pdev) {
.....
}
......
static struct platform_driver spi_gpio_cs_driver = {
.driver = {
.name = DRIVER_NAME,
},
.probe = spi_gpio_cs_probe,
.remove = spi_gpio_cs_remove,
};
module_platform_driver(spi_gpio_cs_driver);
I've tried to put "return -ENODEV;" and "return -ENOMEM;" in the begining of the probe function, but insmod works without error message. I've looked other modules, which uses platform device infrastructure, this part of code in most of them looks the same.