diff mbox series

[v2,1/5] iio: Documentation: update definitions for bufferY and scan_elements

Message ID 20210217083438.37865-2-alexandru.ardelean@analog.com (mailing list archive)
State New
Headers show
Series iio: Add output buffer support | expand

Commit Message

Alexandru Ardelean Feb. 17, 2021, 8:34 a.m. UTC
Since the new change to the IIO buffer infrastructure, the buffer/ and
scan_elements/ directories have been merged into bufferY/ to have some
attributes available per-buffer.

This change updates the ABI docs to reflect this change.

The hwfifo attributes are not updated, as for now these should be used
via the legacy buffer/ directory until they are moved into core.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 Documentation/ABI/testing/sysfs-bus-iio | 85 +++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

Comments

Jonathan Cameron Feb. 18, 2021, 12:19 p.m. UTC | #1
On Wed, 17 Feb 2021 10:34:34 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> Since the new change to the IIO buffer infrastructure, the buffer/ and
> scan_elements/ directories have been merged into bufferY/ to have some
> attributes available per-buffer.
> 
> This change updates the ABI docs to reflect this change.
> 
> The hwfifo attributes are not updated, as for now these should be used
> via the legacy buffer/ directory until they are moved into core.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

This doesn't really have anything to do with the rest of the set - so ideally
you'd have sent it separately.

One trivial typo below, that I can fix whilst applying.

> ---
>  Documentation/ABI/testing/sysfs-bus-iio | 85 +++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index d957f5da5c04..f2a72d7fbacb 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1118,12 +1118,16 @@ Description:
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/length
>  KernelVersion:	2.6.35
> +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/length
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Number of scans contained by the buffer.
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/enable
>  KernelVersion:	2.6.35
> +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/enable
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Actually start the buffer capture up.  Will start trigger
> @@ -1131,11 +1135,16 @@ Description:
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/scan_elements
>  KernelVersion:	2.6.37
> +What:		/sys/bus/iio/devices/iio:deviceX/buffeY
bufferY

I'll fix whilst applying.

> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Directory containing interfaces for elements that will be
>  		captured for a single triggered sample set in the buffer.
>  
> +		Since kernel 5.11 the scan_elements attributes are merged into
> +		the bufferY directory, to be configurable per buffer.
> +
>  What:		/sys/.../iio:deviceX/scan_elements/in_accel_x_en
>  What:		/sys/.../iio:deviceX/scan_elements/in_accel_y_en
>  What:		/sys/.../iio:deviceX/scan_elements/in_accel_z_en
> @@ -1164,6 +1173,34 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_en
>  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
>  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_en
>  KernelVersion:	2.6.37
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_x_en
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_y_en
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_z_en
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_en
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_en
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_en
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_x_en
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_y_en
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_z_en
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_en
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_en
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_en
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_en
> +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY-voltageZ_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_en
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_en
> +What:		/sys/.../iio:deviceX/bufferY/in_incli_x_en
> +What:		/sys/.../iio:deviceX/bufferY/in_incli_y_en
> +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_en
> +What:		/sys/.../iio:deviceX/bufferY/in_pressure_en
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_en
> +What:		/sys/.../iio:deviceX/bufferY/in_proximity_en
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Scan element control for triggered data capture.
> @@ -1185,6 +1222,23 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_type
>  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
>  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_type
>  KernelVersion:	2.6.37
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_type
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_type
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_type
> +What:		/sys/.../iio:deviceX/bufferY/in_incli_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_type
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_type
> +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_type
> +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_type
> +What:		/sys/.../iio:deviceX/bufferY/in_pressure_type
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_type
> +What:		/sys/.../iio:deviceX/bufferY/in_proximity_type
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Description of the scan element data storage within the buffer
> @@ -1241,6 +1295,33 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_index
>  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
>  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_index
>  KernelVersion:	2.6.37
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_index
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_index
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_index
> +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_index
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_index
> +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_index
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_x_index
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_y_index
> +What:		/sys/.../iio:deviceX/bufferY/in_accel_z_index
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_index
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_index
> +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_index
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_x_index
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_y_index
> +What:		/sys/.../iio:deviceX/bufferY/in_magn_z_index
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_index
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_index
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_index
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_index
> +What:		/sys/.../iio:deviceX/bufferY/in_incli_x_index
> +What:		/sys/.../iio:deviceX/bufferY/in_incli_y_index
> +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_index
> +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_index
> +What:		/sys/.../iio:deviceX/bufferY/in_pressure_index
> +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_index
> +What:		/sys/.../iio:deviceX/bufferY/in_proximity_index
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		A single positive integer specifying the position of this
> @@ -1455,6 +1536,8 @@ Description:
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/watermark
>  KernelVersion:	4.2
> +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/watermark
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		A single positive integer specifying the maximum number of scan
> @@ -1473,6 +1556,8 @@ Description:
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/data_available
>  KernelVersion: 4.16
> +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/data_available
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		A read-only value indicating the bytes of data available in the
Jonathan Cameron Feb. 18, 2021, 1:36 p.m. UTC | #2
On Thu, 18 Feb 2021 12:19:48 +0000
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 17 Feb 2021 10:34:34 +0200
> Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> 
> > Since the new change to the IIO buffer infrastructure, the buffer/ and
> > scan_elements/ directories have been merged into bufferY/ to have some
> > attributes available per-buffer.
> > 
> > This change updates the ABI docs to reflect this change.
> > 
> > The hwfifo attributes are not updated, as for now these should be used
> > via the legacy buffer/ directory until they are moved into core.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>  
> 
> This doesn't really have anything to do with the rest of the set - so ideally
> you'd have sent it separately.
> 
> One trivial typo below, that I can fix whilst applying.
Applied with that fix.

Jonathan

> 
> > ---
> >  Documentation/ABI/testing/sysfs-bus-iio | 85 +++++++++++++++++++++++++
> >  1 file changed, 85 insertions(+)
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > index d957f5da5c04..f2a72d7fbacb 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > @@ -1118,12 +1118,16 @@ Description:
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/buffer/length
> >  KernelVersion:	2.6.35
> > +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/length
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Number of scans contained by the buffer.
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/buffer/enable
> >  KernelVersion:	2.6.35
> > +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/enable
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Actually start the buffer capture up.  Will start trigger
> > @@ -1131,11 +1135,16 @@ Description:
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/scan_elements
> >  KernelVersion:	2.6.37
> > +What:		/sys/bus/iio/devices/iio:deviceX/buffeY  
> bufferY
> 
> I'll fix whilst applying.
> 
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Directory containing interfaces for elements that will be
> >  		captured for a single triggered sample set in the buffer.
> >  
> > +		Since kernel 5.11 the scan_elements attributes are merged into
> > +		the bufferY directory, to be configurable per buffer.
> > +
> >  What:		/sys/.../iio:deviceX/scan_elements/in_accel_x_en
> >  What:		/sys/.../iio:deviceX/scan_elements/in_accel_y_en
> >  What:		/sys/.../iio:deviceX/scan_elements/in_accel_z_en
> > @@ -1164,6 +1173,34 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_en
> >  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
> >  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_en
> >  KernelVersion:	2.6.37
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_x_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_y_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_z_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_x_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_y_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_z_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY-voltageZ_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_incli_x_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_incli_y_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressure_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_en
> > +What:		/sys/.../iio:deviceX/bufferY/in_proximity_en
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Scan element control for triggered data capture.
> > @@ -1185,6 +1222,23 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_type
> >  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
> >  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_type
> >  KernelVersion:	2.6.37
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_incli_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressure_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_type
> > +What:		/sys/.../iio:deviceX/bufferY/in_proximity_type
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Description of the scan element data storage within the buffer
> > @@ -1241,6 +1295,33 @@ What:		/sys/.../iio:deviceX/scan_elements/in_pressure_index
> >  What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
> >  What:		/sys/.../iio:deviceX/scan_elements/in_proximity_index
> >  KernelVersion:	2.6.37
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_x_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_y_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_accel_z_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_x_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_y_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_magn_z_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_incli_x_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_incli_y_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_timestamp_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressureY_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_pressure_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_index
> > +What:		/sys/.../iio:deviceX/bufferY/in_proximity_index
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		A single positive integer specifying the position of this
> > @@ -1455,6 +1536,8 @@ Description:
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/buffer/watermark
> >  KernelVersion:	4.2
> > +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/watermark
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		A single positive integer specifying the maximum number of scan
> > @@ -1473,6 +1556,8 @@ Description:
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/buffer/data_available
> >  KernelVersion: 4.16
> > +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/data_available
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		A read-only value indicating the bytes of data available in the  
>
Mauro Carvalho Chehab April 1, 2021, 1:44 p.m. UTC | #3
Em Wed, 17 Feb 2021 10:34:34 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> escreveu:

> Since the new change to the IIO buffer infrastructure, the buffer/ and
> scan_elements/ directories have been merged into bufferY/ to have some
> attributes available per-buffer.
> 
> This change updates the ABI docs to reflect this change.
> 
> The hwfifo attributes are not updated, as for now these should be used
> via the legacy buffer/ directory until they are moved into core.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-iio | 85 +++++++++++++++++++++++++
>  1 file changed, 85 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index d957f5da5c04..f2a72d7fbacb 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1118,12 +1118,16 @@ Description:
>  
>  What:		/sys/bus/iio/devices/iio:deviceX/buffer/length
>  KernelVersion:	2.6.35
> +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/length
> +KernelVersion:	5.11
>  Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Number of scans contained by the buffer.

The ABI parser doesn't like things like this:

	$ ./scripts/get_abi.pl validate

	Warning: file Documentation/ABI/testing/sysfs-bus-iio#1167:
		What '/sys/bus/iio/devices/iio:deviceX/buffer/length' doesn't have a description

The main reason is that all properties, including KernelVersion, 
Contact and Description are associated to a group of properties.

To be frank, for me that don't work with IIO, the above ABI
description doesn't sound clear.

I mean, what's the difference between
	/sys/bus/iio/devices/iio:deviceX/buffer/length
and
	/sys/bus/iio/devices/iio:deviceX/bufferY/length?


If the intention is to tell that:
	/sys/bus/iio/devices/iio:deviceX/buffer/length
was obsoleted by:
	/sys/bus/iio/devices/iio:deviceX/bufferY/length

IMO, the right thing would be to move the deprecated definition to
	Documentation/ABI/obsolete/

If, on the other hand, both are completely identical and 
non-obsoleted, why to have both APIs? 

Or did you just missed adding a different description for the
new ABI symbols, but this was dropped due to some merge
conflict?

Thanks,
Mauro
Jonathan Cameron April 1, 2021, 3 p.m. UTC | #4
On Thu, 1 Apr 2021 15:44:08 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:

> Em Wed, 17 Feb 2021 10:34:34 +0200
> Alexandru Ardelean <alexandru.ardelean@analog.com> escreveu:
> 
> > Since the new change to the IIO buffer infrastructure, the buffer/ and
> > scan_elements/ directories have been merged into bufferY/ to have some
> > attributes available per-buffer.
> > 
> > This change updates the ABI docs to reflect this change.
> > 
> > The hwfifo attributes are not updated, as for now these should be used
> > via the legacy buffer/ directory until they are moved into core.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > ---
> >  Documentation/ABI/testing/sysfs-bus-iio | 85 +++++++++++++++++++++++++
> >  1 file changed, 85 insertions(+)
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > index d957f5da5c04..f2a72d7fbacb 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > @@ -1118,12 +1118,16 @@ Description:
> >  
> >  What:		/sys/bus/iio/devices/iio:deviceX/buffer/length
> >  KernelVersion:	2.6.35
> > +What:		/sys/bus/iio/devices/iio:deviceX/bufferY/length
> > +KernelVersion:	5.11
> >  Contact:	linux-iio@vger.kernel.org
> >  Description:
> >  		Number of scans contained by the buffer.  
> 
> The ABI parser doesn't like things like this:
> 
> 	$ ./scripts/get_abi.pl validate
> 
> 	Warning: file Documentation/ABI/testing/sysfs-bus-iio#1167:
> 		What '/sys/bus/iio/devices/iio:deviceX/buffer/length' doesn't have a description
> 
> The main reason is that all properties, including KernelVersion, 
> Contact and Description are associated to a group of properties.
> 
> To be frank, for me that don't work with IIO, the above ABI
> description doesn't sound clear.
> 
> I mean, what's the difference between
> 	/sys/bus/iio/devices/iio:deviceX/buffer/length
> and
> 	/sys/bus/iio/devices/iio:deviceX/bufferY/length?
> 
> 
> If the intention is to tell that:
> 	/sys/bus/iio/devices/iio:deviceX/buffer/length
> was obsoleted by:
> 	/sys/bus/iio/devices/iio:deviceX/bufferY/length
> 
> IMO, the right thing would be to move the deprecated definition to
> 	Documentation/ABI/obsolete/
> 
> If, on the other hand, both are completely identical and 
> non-obsoleted, why to have both APIs? 
> 
> Or did you just missed adding a different description for the
> new ABI symbols, but this was dropped due to some merge
> conflict?

You are right that the version with out the index is obsolete
but it's only just become so and there are no realistic way we
are going to ever be able to remove it however much we encourage
userspace to use the new interface.  We are stuck with this bit
of backwards compatibility indefinitely.

I'm fine with moving it and related definitions over to
ABI/obsolete if that makes sense.

Jonathan



> 
> Thanks,
> Mauro
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index d957f5da5c04..f2a72d7fbacb 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1118,12 +1118,16 @@  Description:
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/length
 KernelVersion:	2.6.35
+What:		/sys/bus/iio/devices/iio:deviceX/bufferY/length
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		Number of scans contained by the buffer.
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/enable
 KernelVersion:	2.6.35
+What:		/sys/bus/iio/devices/iio:deviceX/bufferY/enable
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		Actually start the buffer capture up.  Will start trigger
@@ -1131,11 +1135,16 @@  Description:
 
 What:		/sys/bus/iio/devices/iio:deviceX/scan_elements
 KernelVersion:	2.6.37
+What:		/sys/bus/iio/devices/iio:deviceX/buffeY
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		Directory containing interfaces for elements that will be
 		captured for a single triggered sample set in the buffer.
 
+		Since kernel 5.11 the scan_elements attributes are merged into
+		the bufferY directory, to be configurable per buffer.
+
 What:		/sys/.../iio:deviceX/scan_elements/in_accel_x_en
 What:		/sys/.../iio:deviceX/scan_elements/in_accel_y_en
 What:		/sys/.../iio:deviceX/scan_elements/in_accel_z_en
@@ -1164,6 +1173,34 @@  What:		/sys/.../iio:deviceX/scan_elements/in_pressure_en
 What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
 What:		/sys/.../iio:deviceX/scan_elements/in_proximity_en
 KernelVersion:	2.6.37
+What:		/sys/.../iio:deviceX/bufferY/in_accel_x_en
+What:		/sys/.../iio:deviceX/bufferY/in_accel_y_en
+What:		/sys/.../iio:deviceX/bufferY/in_accel_z_en
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_en
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_en
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_en
+What:		/sys/.../iio:deviceX/bufferY/in_magn_x_en
+What:		/sys/.../iio:deviceX/bufferY/in_magn_y_en
+What:		/sys/.../iio:deviceX/bufferY/in_magn_z_en
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_en
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_en
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_en
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_en
+What:		/sys/.../iio:deviceX/bufferY/in_timestamp_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY-voltageZ_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_en
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_en
+What:		/sys/.../iio:deviceX/bufferY/in_incli_x_en
+What:		/sys/.../iio:deviceX/bufferY/in_incli_y_en
+What:		/sys/.../iio:deviceX/bufferY/in_pressureY_en
+What:		/sys/.../iio:deviceX/bufferY/in_pressure_en
+What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_en
+What:		/sys/.../iio:deviceX/bufferY/in_proximity_en
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		Scan element control for triggered data capture.
@@ -1185,6 +1222,23 @@  What:		/sys/.../iio:deviceX/scan_elements/in_pressure_type
 What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
 What:		/sys/.../iio:deviceX/scan_elements/in_proximity_type
 KernelVersion:	2.6.37
+What:		/sys/.../iio:deviceX/bufferY/in_accel_type
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_type
+What:		/sys/.../iio:deviceX/bufferY/in_magn_type
+What:		/sys/.../iio:deviceX/bufferY/in_incli_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_type
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_type
+What:		/sys/.../iio:deviceX/bufferY/in_timestamp_type
+What:		/sys/.../iio:deviceX/bufferY/in_pressureY_type
+What:		/sys/.../iio:deviceX/bufferY/in_pressure_type
+What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_type
+What:		/sys/.../iio:deviceX/bufferY/in_proximity_type
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		Description of the scan element data storage within the buffer
@@ -1241,6 +1295,33 @@  What:		/sys/.../iio:deviceX/scan_elements/in_pressure_index
 What:		/sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
 What:		/sys/.../iio:deviceX/scan_elements/in_proximity_index
 KernelVersion:	2.6.37
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_index
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_supply_index
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_i_index
+What:		/sys/.../iio:deviceX/bufferY/in_voltageY_q_index
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_i_index
+What:		/sys/.../iio:deviceX/bufferY/in_voltage_q_index
+What:		/sys/.../iio:deviceX/bufferY/in_accel_x_index
+What:		/sys/.../iio:deviceX/bufferY/in_accel_y_index
+What:		/sys/.../iio:deviceX/bufferY/in_accel_z_index
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_x_index
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_y_index
+What:		/sys/.../iio:deviceX/bufferY/in_anglvel_z_index
+What:		/sys/.../iio:deviceX/bufferY/in_magn_x_index
+What:		/sys/.../iio:deviceX/bufferY/in_magn_y_index
+What:		/sys/.../iio:deviceX/bufferY/in_magn_z_index
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_index
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_index
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_index
+What:		/sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_index
+What:		/sys/.../iio:deviceX/bufferY/in_incli_x_index
+What:		/sys/.../iio:deviceX/bufferY/in_incli_y_index
+What:		/sys/.../iio:deviceX/bufferY/in_timestamp_index
+What:		/sys/.../iio:deviceX/bufferY/in_pressureY_index
+What:		/sys/.../iio:deviceX/bufferY/in_pressure_index
+What:		/sys/.../iio:deviceX/bufferY/in_rot_quaternion_index
+What:		/sys/.../iio:deviceX/bufferY/in_proximity_index
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		A single positive integer specifying the position of this
@@ -1455,6 +1536,8 @@  Description:
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/watermark
 KernelVersion:	4.2
+What:		/sys/bus/iio/devices/iio:deviceX/bufferY/watermark
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		A single positive integer specifying the maximum number of scan
@@ -1473,6 +1556,8 @@  Description:
 
 What:		/sys/bus/iio/devices/iio:deviceX/buffer/data_available
 KernelVersion: 4.16
+What:		/sys/bus/iio/devices/iio:deviceX/bufferY/data_available
+KernelVersion:	5.11
 Contact:	linux-iio@vger.kernel.org
 Description:
 		A read-only value indicating the bytes of data available in the