Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

doc: iio: Fix sysfs paths

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

Signed-off-by: Thorsten Scherer <t.scherer@eckelmann.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240805120357.21135-1-t.scherer@eckelmann.de

authored by

Thorsten Scherer and committed by
Jonathan Corbet
32322162 cd0403ad

+11 -11
+4 -4
Documentation/driver-api/iio/buffers.rst
··· 15 15 IIO buffer sysfs interface 16 16 ========================== 17 17 An IIO buffer has an associated attributes directory under 18 - :file:`/sys/bus/iio/iio:device{X}/buffer/*`. Here are some of the existing 19 - attributes: 18 + :file:`/sys/bus/iio/devices/iio:device{X}/buffer/*`. Here are some of the 19 + existing attributes: 20 20 21 21 * :file:`length`, the total number of data samples (capacity) that can be 22 22 stored by the buffer. ··· 28 28 The meta information associated with a channel reading placed in a buffer is 29 29 called a scan element. The important bits configuring scan elements are 30 30 exposed to userspace applications via the 31 - :file:`/sys/bus/iio/iio:device{X}/scan_elements/` directory. This directory contains 32 - attributes of the following form: 31 + :file:`/sys/bus/iio/devices/iio:device{X}/scan_elements/` directory. This 32 + directory contains attributes of the following form: 33 33 34 34 * :file:`enable`, used for enabling a channel. If and only if its attribute 35 35 is non *zero*, then a triggered capture will contain data samples for this
+7 -7
Documentation/driver-api/iio/core.rst
··· 24 24 25 25 There are two ways for a user space application to interact with an IIO driver. 26 26 27 - 1. :file:`/sys/bus/iio/iio:device{X}/`, this represents a hardware sensor 27 + 1. :file:`/sys/bus/iio/devices/iio:device{X}/`, this represents a hardware sensor 28 28 and groups together the data channels of the same chip. 29 29 2. :file:`/dev/iio:device{X}`, character device node interface used for 30 30 buffered data transfer and for events information retrieval. ··· 51 51 52 52 Attributes are sysfs files used to expose chip info and also allowing 53 53 applications to set various configuration parameters. For device with 54 - index X, attributes can be found under /sys/bus/iio/iio:deviceX/ directory. 55 - Common attributes are: 54 + index X, attributes can be found under /sys/bus/iio/devices/iio:deviceX/ 55 + directory. Common attributes are: 56 56 57 57 * :file:`name`, description of the physical chip. 58 58 * :file:`dev`, shows the major:minor pair associated with ··· 140 140 This channel's definition will generate two separate sysfs files for raw data 141 141 retrieval: 142 142 143 - * :file:`/sys/bus/iio/iio:device{X}/in_intensity_ir_raw` 144 - * :file:`/sys/bus/iio/iio:device{X}/in_intensity_both_raw` 143 + * :file:`/sys/bus/iio/devices/iio:device{X}/in_intensity_ir_raw` 144 + * :file:`/sys/bus/iio/devices/iio:device{X}/in_intensity_both_raw` 145 145 146 146 one file for processed data: 147 147 148 - * :file:`/sys/bus/iio/iio:device{X}/in_illuminance_input` 148 + * :file:`/sys/bus/iio/devices/iio:device{X}/in_illuminance_input` 149 149 150 150 and one shared sysfs file for sampling frequency: 151 151 152 - * :file:`/sys/bus/iio/iio:device{X}/sampling_frequency`. 152 + * :file:`/sys/bus/iio/devices/iio:device{X}/sampling_frequency`. 153 153 154 154 Here is how we can make use of the channel's indexing:: 155 155