<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head><body style="">
<div>
<pre>We have to follow the following steps<br/>1. <br/> static struct spi_board_info your_board_info[] __initdata = {<br/> {
.modalias = "driver_name",<br/> .....<br/> }<br/>2. Register your board with: spi_register_board_info()<br/>3. you have to add device to the device table with <br/> MODULE_DEVICE_TABLE(spi, your_device_id).<br/> <br/><br/> your device id name should be the modalise name that you are providing<br/>in spi_board_info().<br/><br/>These steps may help you.<br/><br/><br/></pre> On June 11, 2014 at 2:59 AM Greg KH <greg@kroah.com> wrote:
<br/>> On Tue, Jun 10, 2014 at 03:57:27PM -0300, Daniel Hilst Selli wrote:
<br/>> > I register a spi_board_info on my board-*.c file as this
<br/>> >
<br/>> > http://pastebin.com/nUGuvt71
<br/>> >
<br/>> >
<br/>> > Then create my module named mydevice.ko
<br/>> >
<br/>> > Is this enought to get the module loaded automatically or I'm missing
<br/>> > something?
<br/>>
<br/>> I'm guessing something is missing, otherwise you wouldn't be asking us,
<br/>> right?
<br/>>
<br/>> No MODULE_DEVICE_TABLE() line?
<br/>>
<br/>>
<br/>> _______________________________________________
<br/>> Kernelnewbies mailing list
<br/>> Kernelnewbies@kernelnewbies.org
<br/>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
</div>
<br />-------------------------------------------------------------------------------------------------------------------------------
<br />[ C-DAC is on Social-Media too. Kindly follow us at:
<br />Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
<br />
<br />This e-mail is for the sole use of the intended recipient(s) and may
<br />contain confidential and privileged information. If you are not the
<br />intended recipient, please contact the sender by reply e-mail and destroy
<br />all copies and the original message. Any unauthorized review, use,
<br />disclosure, dissemination, forwarding, printing or copying of this email
<br />is strictly prohibited and appropriate legal action will be taken.
<br />-------------------------------------------------------------------------------------------------------------------------------
</body></html>