We have to follow the following steps
1.
static struct spi_board_info your_board_info[] __initdata = {
{
.modalias = "driver_name",
.....
}
2. Register your board with: spi_register_board_info()
3. you have to add device to the device table with
MODULE_DEVICE_TABLE(spi, your_device_id).
your device id name should be the modalise name that you are providing
in spi_board_info().
These steps may help you.
On June 11, 2014 at 2:59 AM Greg KH <greg@kroah.com> wrote:
> On Tue, Jun 10, 2014 at 03:57:27PM -0300, Daniel Hilst Selli wrote:
> > I register a spi_board_info on my board-*.c file as this
> >
> > http://pastebin.com/nUGuvt71
> >
> >
> > Then create my module named mydevice.ko
> >
> > Is this enought to get the module loaded automatically or I'm missing
> > something?
>
> I'm guessing something is missing, otherwise you wouldn't be asking us,
> right?
>
> No MODULE_DEVICE_TABLE() line?
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies