spi_board_info and module automatic load
From: Varka Bhadram <hidden>
Date: 2014-06-11 03:53:07
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 [off-list ref] wrote:On Tue, Jun 10, 2014 at 03:57:27PM -0300, Daniel Hilst Selli wrote:quoted
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