(Partially) graduating IIO
LWN 465358:(部分)就绪的 IIO
Link: https://lwn.net/Articles/465358/
Benefits for LWN subscribers
The primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today!
By Jonathan Corbet
November 2, 2011
The industrial I/O (IIO) subsystem has lived in the staging tree for some time. It provides a framework for drivers that deal with all kinds of sensors that measure quantities like voltages, temperatures, acceleration, ambient light, and more. There has been some disagreement over the years about how sensors of this type should fit into the kernel; IIO, it is hoped, will provide the answer.
工业输入/输出(IIO)子系统为开发某一些传感器设备的驱动提供了一个框架,这些传感器设备采集的数据类型包括电压,温度,加速度,环境光照值等等.
The core IIO code sat out of tree for a long time; the state of the code, it is said, reflected that fact. There has been a determined effort to improve things in the staging tree, with some measurable results. There is now a set of core IIO patches that, according to maintainer Jonathan Cameron, is now ready to move out of staging and into the mainline proper.
IIO sensors vary a lot, from simple, low-bandwidth sensors to complex, high-bandwidth devices. The initial IIO move is aimed at the first set. For this kind of sensor, the user-space interface is expected to live entirely in sysfs, under /sys/bus/iio/devices. Each device entry will have a number of attributes; some, like name and sampling_frequency, will be present for all sensors. Others will depend on what the sensor actually measures; the proposed ABI attempts to standardize the names of those attributes wherever possible.
用户态访问这类传感器时,可以完全通过 sysfs 来实现,具体的文件系统路径是 /sys/bus/iio/devices.每个设备对应一个目录,其目录下由多个属性文件;有一些是对所有种类的设备都需要的公共属性,譬如 name 和 sampling_frequency.
The plan is to get this core interface into the mainline, then to start moving the simpler (and cleaner) drivers after it. Support for more complex devices will come later. As of this writing, this code has not been pulled for 3.2, but that could yet happen. Meanwhile, vast numbers of IIO changes have gone into the staging tree for 3.2; there is clearly a lot of interest in getting this subsystem into shape.
具体的开发计划是安排核心接口部分的代码先进去主线,然后再合入那些相对简单(和整理得较好)的驱动程序.那些相对复杂的设备的支持将在稍后进行.