diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
commit | e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch) | |
tree | ea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/iio/Documentation/userspace.txt | |
parent | 81280572ca6f54009edfa4deee563e8678784218 (diff) | |
parent | a4ac0d847af9dd34d5953a5e264400326144b6b2 (diff) | |
download | op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.zip op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.gz |
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/Documentation/userspace.txt')
-rw-r--r-- | drivers/staging/iio/Documentation/userspace.txt | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/drivers/staging/iio/Documentation/userspace.txt b/drivers/staging/iio/Documentation/userspace.txt index 4838818..ff06e5d 100644 --- a/drivers/staging/iio/Documentation/userspace.txt +++ b/drivers/staging/iio/Documentation/userspace.txt @@ -1,60 +1,12 @@ Userspace access to IIO -Example, ST Microelectronics LIS3L02DQ accelerometer. - -Typical sysfs entries (pruned for clarity) - -/sys/class/iio - device0 - iio_dev related elements - name - driver specific identifier (here lis3l02dq) - accel_x - polled (or from ring) raw readout of acceleration - accel_x_gain - hardware gain (calibration) - accel_x_offset - hardware offset (calibration) - available_sampling_frequency - - available_sampling_frequency - what options are there - sampling_frequency - control of internal sampling frequency - scan_elements - controls which channels will be stored in the ring buffer - scan_en_accel_x - scan_en_accel_y - scan_en_timestamp - device - link to underlying hardware device - uevent - udev related element - - thresh - unified threshold used for detection on all axis - event_line0_sources - which events are enabled - accel_x_high - enable x axis high threshold event - accel_x_low - enable x axis low threshold event - - event_line0 - event interface - dev - major:minor for the chrdev (note major allocation dynamic) - trigger - consumer attachement - current_trigger - name based association with a trigger - ring_buffer0 - ring buffer interface - bps - byptes per sample (read only), dependant on scan element selection - length - (rw) specificy length fo software ring buffer (typically ro in hw case) - ring_enable - turn the ring on. If its the first to be enabled attached to this - trigger will also enable the trigger. - ring_access0 - dev - major:minor for ring buffer access chrdev - ring_event_line0 - dev - major:minor for ring buffer event chrdev - - trigger0 - data ready trigger elements - name - unqiue name of trigger +The sysfs attributes are documented in sysfs-bus-iio. Udev will create the following entries under /dev by default: -ring_access0 - ring access chrdev -ring_event0 - ring event chrdev -event_line0 - general event chrdev. - -For the example code we assume the following rules have been used to ensure -unique and consistent naming of these for the lis3l02dq in question: - -KERNEL="ring_event_line*", ID="spi1.0", DRIVER="lis3l02dq", NAME="iio/lis3l02dq_ring_event" -KERNEL="event_line*", ID="spi1.0", DRIVER="lis3l02dq", NAME="iio/lis3l02dq_event" -KERNEL="ring_access*", ID="spi1.0", DRIVER="lis3l02dq", NAME="iio/lis3l02dq_ring_access" +device0:buffer0:access0 - ring access chrdev +device0:buffer0:event0 - ring event chrdev +device0:event0 - general event chrdev. The files, lis3l02dqbuffersimple.c and iio_utils.h in this directory provide an example of how to use the ring buffer and event interfaces. |