Commit 32322162 authored by Thorsten Scherer's avatar Thorsten Scherer Committed by Jonathan Corbet
Browse files

doc: iio: Fix sysfs paths



Add missing 'devices' folder in the /sys/bus/iio path.

Signed-off-by: default avatarThorsten Scherer <t.scherer@eckelmann.de>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240805120357.21135-1-t.scherer@eckelmann.de
parent cd0403ad
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@ trigger source. Multiple data channels can be read at once from
IIO buffer sysfs interface
==========================
An IIO buffer has an associated attributes directory under
:file:`/sys/bus/iio/iio:device{X}/buffer/*`. Here are some of the existing
attributes:
:file:`/sys/bus/iio/devices/iio:device{X}/buffer/*`. Here are some of the
existing attributes:

* :file:`length`, the total number of data samples (capacity) that can be
  stored by the buffer.
@@ -28,8 +28,8 @@ IIO buffer setup
The meta information associated with a channel reading placed in a buffer is
called a scan element. The important bits configuring scan elements are
exposed to userspace applications via the
:file:`/sys/bus/iio/iio:device{X}/scan_elements/` directory. This directory contains
attributes of the following form:
:file:`/sys/bus/iio/devices/iio:device{X}/scan_elements/` directory. This
directory contains attributes of the following form:

* :file:`enable`, used for enabling a channel. If and only if its attribute
  is non *zero*, then a triggered capture will contain data samples for this
+7 −7
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ then we will show how a device driver makes use of an IIO device.

There are two ways for a user space application to interact with an IIO driver.

1. :file:`/sys/bus/iio/iio:device{X}/`, this represents a hardware sensor
1. :file:`/sys/bus/iio/devices/iio:device{X}/`, this represents a hardware sensor
   and groups together the data channels of the same chip.
2. :file:`/dev/iio:device{X}`, character device node interface used for
   buffered data transfer and for events information retrieval.
@@ -51,8 +51,8 @@ IIO device sysfs interface

Attributes are sysfs files used to expose chip info and also allowing
applications to set various configuration parameters. For device with
index X, attributes can be found under /sys/bus/iio/iio:deviceX/ directory.
Common attributes are:
index X, attributes can be found under /sys/bus/iio/devices/iio:deviceX/
directory.  Common attributes are:

* :file:`name`, description of the physical chip.
* :file:`dev`, shows the major:minor pair associated with
@@ -140,16 +140,16 @@ Here is how we can make use of the channel's modifiers::
This channel's definition will generate two separate sysfs files for raw data
retrieval:

* :file:`/sys/bus/iio/iio:device{X}/in_intensity_ir_raw`
* :file:`/sys/bus/iio/iio:device{X}/in_intensity_both_raw`
* :file:`/sys/bus/iio/devices/iio:device{X}/in_intensity_ir_raw`
* :file:`/sys/bus/iio/devices/iio:device{X}/in_intensity_both_raw`

one file for processed data:

* :file:`/sys/bus/iio/iio:device{X}/in_illuminance_input`
* :file:`/sys/bus/iio/devices/iio:device{X}/in_illuminance_input`

and one shared sysfs file for sampling frequency:

* :file:`/sys/bus/iio/iio:device{X}/sampling_frequency`.
* :file:`/sys/bus/iio/devices/iio:device{X}/sampling_frequency`.

Here is how we can make use of the channel's indexing::