All of lore.kernel.org
 help / color / mirror / Atom feed
* spi_board_info and module automatic load
@ 2014-06-10 18:57 Daniel Hilst Selli
  2014-06-10 21:29 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hilst Selli @ 2014-06-10 18:57 UTC (permalink / raw)
  To: kernelnewbies

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?

Cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* spi_board_info and module automatic load
  2014-06-10 18:57 spi_board_info and module automatic load Daniel Hilst Selli
@ 2014-06-10 21:29 ` Greg KH
  2014-06-11  3:53   ` Varka Bhadram
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-06-10 21:29 UTC (permalink / raw)
  To: kernelnewbies

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* spi_board_info and module automatic load
  2014-06-10 21:29 ` Greg KH
@ 2014-06-11  3:53   ` Varka Bhadram
  0 siblings, 0 replies; 3+ messages in thread
From: Varka Bhadram @ 2014-06-11  3:53 UTC (permalink / raw)
  To: kernelnewbies

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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140611/ae179f9a/attachment.html 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-11  3:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 18:57 spi_board_info and module automatic load Daniel Hilst Selli
2014-06-10 21:29 ` Greg KH
2014-06-11  3:53   ` Varka Bhadram

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.