MODULE_DEVICE_TABLE(类型, ID表);设备树ID表 类型:of C写的platform_device的ID表 类型:platform C写的i2c设备的ID表 类型:i2c C写的USB设备的ID表 类型:usb 以我目前遇到一个I2C实例说下比较清晰点 1、注册设备表,说明支持的类型 static const struct i2c_device_id kxcjk1013
MODULE_DEVICE_TABLE的理解 在Linux IIC驱动中看到一段代码: static struct platform_device_id xx_driver_ids[] = { { .name = "s3c2410-i2c", .driver_data = TYPE_S3C2410, }, { .name = "s3c2440-i2c", ...
}, { .name = "s3c2440-i2c", .driver_data = TYPE_S3C2440, }, { }, }; MODULE_DEVICE_TABLE(platform, xx_driver_ids); 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. MODULE_DEVICE_TABLE什么意思呢?查找了一番发现,很多文章表述的不够明确,我结合文章及自己的分析理解说一下,不知道有没有不对的...
1.疑问在阅读linux源代码时发现,在驱动中大量使用了 MODULE_DEVICE_TABLE这个宏。MODULE_DEVICE_TABLE(platform, s3c_adc_driver_ids); MODULE_DEVICE_TABLE(of, of_flash_match); MODULE_DEVICE_TABLE(of, dma_m…
MODULE_DEVICE_TABLE(i2c, kxcjk1013_id); 2、假如我在dts中定义支持设备为 第二组 {"kxcj91008", KXCJ91008}, DTS 参数如下 kxcj9@1e { status = "disabled"; compatible = "kionix,kxcj91008"; reg = <0x1e>; interrupts = <0 65 1>; ...
a storage circuit is connected with the I2C bus of the MCU, a button circuit is connected with the MCU through an IO port, remote meter reading connection is achieved through a GPRS network, the module is external and pluggable, the grounding contact pin of the connecting contact pin of the...
MODULE_DEVICE_TABLE(i2c, cs4270_id); static struct i2c_driver cs4270_i2c_driver = { .driver = { .name = "cs4270", .owner = THIS_MODULE, }, .id_table = cs4270_id, .probe = cs4270_i2c_probe, .remove = cs4270_i2c_remove, ...
.name = "s3c2440-i2c", .driver_data = TYPE_S3C2440, }, { }, }; MODULE_DEVICE_TABLE(platform, xx_driver_ids); MODULE_DEVICE_TABLE什么意思呢?查找了一番发现,很多文章表述的不够明确,我结合文章及自己的分析理解说一下,不知道有没有不对的地方。