dts中会用到的MODULE_DEVICE_TABLE

来源:互联网 发布:淘宝买iphone8靠谱吗 编辑:程序博客网 时间:2024/05/28 05:15
6. MODULE_DEVICE_TABLE(spi, efp_id);//        
                        自动 insmod    try if the device is able to hot-plug

    1.Each driver in the code exposes its vendor/device id using:
      MODULE_DEVICE_TABLE(of, omap_mcspi_of_match);

    2.At compilation time the build process extracts this infomation from all the drivers and prepares a device table.

    3.When you insert the device, the device table is referred by the kernel and if an entry is found matching the device/vendor id of the added device, then its module is loaded and initialized.

0 0