Merge branch 'msm-core' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
[pandora-kernel.git] / drivers / staging / iio / Documentation / overview.txt
1 Overview of IIO
2
3 The Industrial I/O subsytem is intended to provide support for devices
4 that in some sense are analog to digital convertors (ADCs). As many
5 actual devices combine some ADCs with digital to analog convertors
6 (DACs) the intention is to add that functionality at a future date
7 (hence the name).
8
9 The aim is to fill the gap between the somewhat similar hwmon and
10 input subsystems.  Hwmon is very much directed at low sample rate
11 sensors used in applications such as fan speed control and temperature
12 measurement.  Input is, as it's name suggests focused on input
13 devices. In some cases there is considerable overlap between these and
14 IIO.
15
16 A typical device falling into this category would be connected via SPI
17 or I2C.
18
19 Functionality of IIO
20
21 * Basic device registration and handling. This is very similar to
22 hwmon with simple polled access to device channels via sysfs.
23
24 * Event chrdevs.  These are similar to input in that they provide a
25 route to user space for hardware triggered events. Such events include
26 threshold detectors, free-fall detectors and more complex action
27 detection.  The events themselves are currently very simple with
28 merely an event code and a timestamp.  Any data associated with the
29 event must be accessed via polling.
30
31 Note: A given device may have one or more event channel.  These events are
32 turned on or off (if possible) via sysfs interfaces.
33
34 * Hardware ring buffer support.  Some recent sensors have included
35 fifo / ring buffers on the sensor chip.  These greatly reduce the load
36 on the host CPU by buffering relatively large numbers of data samples
37 based on an internal sampling clock. Examples include VTI SCA3000
38 series and Analog Device ADXL345 accelerometers.  Each ring buffer
39 typically has an event chrdev (similar to the more general ones above)
40 to pass on events such as buffer 50% full and an access chrdev via
41 which the raw data it self may be read back.
42
43 * Trigger and software ring buffer support. In many data analysis
44 applications it it useful to be able to capture data based on some
45 external signal (trigger).  These triggers might be a data ready
46 signal, a gpio line connected to some external system or an on
47 processor periodic interrupt.  A single trigger may initialize data
48 capture or reading from a number of sensors.  These triggers are
49 used in iio to fill software ring buffers acting in a very similar
50 fashion to the hardware buffers described above.
51
52 Other documentation:
53
54 userspace.txt - overview of ring buffer reading from userspace
55
56 device.txt - elemennts of a typical device driver.
57
58 trigger.txt - elements of a typical trigger driver.
59
60 ring.txt - additional elements required for ring buffer support
61
62
63