此言不妥,内核提供的是机制而非策略,通过i2c_dev.c提供的/dev/i2c/0节点,用户空间仍然可以透过i2c_msg数组组织复杂的通信格式。
>另一种方式是为特定的i2c设备编写设备驱动,实现内核态的i2c驱动,在源代码/driver/i2c/chips文件夹中有pcf8574.c文件,该文件针对pcf8574实现了设备驱动,我把它编进了内核。
> 我现在向问的问题是,实现了内核态的i2c驱动后,用户程序如何通过系统调用控制pcf8574,实现特定的操作?还是通过打开/dev/i2c/0文件,对其进行read()、write()操作来实现吗?
如果你只是需要依赖pcf8574进行通信,你的驱动完全可以在用户空间实现。
>
> 2010-01-18
> ________________________________
> sunshinne97209
> --
> You received this message because you are subscribed to the Google
> Groups "Linux设备驱动开发者群落" group.
> To post to this group, send email to linux...@googlegroups.com
> To unsubscribe from this group, send email to
> linuxdriver...@googlegroups.com
> For more options, visit this group at
> https://groups.google.com/group/linuxdriver?hl=zh-CN
>
>