Skip to content

Commit 9c15db9

Browse files
committed
Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle Big set in here from Alexandru Ardelean enabling multiple buffer support. This includes providing a new directory per buffer that combines what was previously in buffer/ and scan_elements/. Old interfaces still in place for compatiblity. Note immuatable branch for scmi patches to allow for some significant rework going on in that subsystem. Merge required updating to reflect some changes in IIO. Late rebase to fix some wrong fixes tags due to some earlier rebases made necessary by messing up the immutable branch. IIO New Device Support * adi,ad5686 - Add info to support AD5673R and AD5677R * bosch,bmi088 - New driver supporting this accelerometer + gyroscope * cros_ec_mkbp - New driver for this proximity sensor that exposes a 'front' sensor. Very simple switch like device, but driver allows it to share interface with more sophisticated proximity sensors. * iio_scmi - New driver to support ARM SCMI protocol to expose underlying accelerometers and gyroscopes via this firmware interface. * st,st_magn - Add ID for IISMDC magnetometer. * ti,ads131e0 - New driver supporting ads131e04, ads131e06 and ads131e08 24 bit ADCs Counter New Device Support * IRQ or GPIO based counter - New driver for a conceptually simple counter that uses interrupts to perform the count. Features * core - Dual buffer supprt including: Various helpers to centralize handling of bufferer related elements. Document existing and new IOCTLs Register the IIO chrdev only if it can actually be used for anything. Rework attribute group creation in the core (lots of patches) Merge buffer/ and scan_elements/ entries into one list + maintain backwards compatible set. Introduce the internal logic and IOCTL to allow multiple buffers + access to an anon FD per buffer to actually read from it. Tidy up tools/iio/iio_generic_buffer and switch to new interfaces. Update ABI docs. A few follow up fixes, unsuprising as this was a huge bit of rework. - Move common case setting of trig->parent to the core. - Provide an iio_read_channel_processed_scale() to avoid loss of precision from iio_read_channel_processed() then applying integer scale. Use it in ntc_thermistor driver in hwmon. - Allow drivers to specify labels from elsewhere than DT. Use it for bmc150 and kxcjk-1013 labels related to position on 2 in one tablets. - Document label usage for proximity and accelerometer sensors. - Some local variable renames for consistency tools - Add -a parameter to iio_event_monitor to allow autoenabling of events. * acpi_als - Add trigger support for devices that don't support notification method. * adi,ad7124 - Allow more than 8 channels. This is a complex little device, but is capable of supporting up to 16 channels if the share certain configuration settings. * hrtimer-trigger - Support sampling frequency below 1Hz. * mediatek,mt8195-auxadc - Add compatible to binding docs (always also includes mt8173) * st,stm32-adc - Enable timetamps when not using DMA. * vishay,vcnl3020 - Sampling frequency control. Cleanup and minor fixes: * treewide - Use some getter and setter functions instead of opencoding. - Set of fixes for pointless casts in various drivers. - Avoid wrong kernel-doc marking on comment blocks. - Fix various other minor kernel-doc issues shown by W=1 * core - Use a signed temporary for IIO_VAL_FRACTIONAL_LOG2 to avoid odd casts. - Fix IIO_VAL_FRACTIONAL_LOG2 for values between -1.0 and 0.0 - Add unit tests for iio_format_value() * docs - Fix formatting/typos in iio_configfs.rst and buffers.rst - Add documentation of index in buffers.rst - Fix scan element description - Avoid some issues with HTML generation from ABI docs by moving duplicated defintions to more generic files. - Drop reference to long dead mailing list. * 104-quad - Remove left over deprecated IIO counter ABI. * adi,adi-axi-adc - Fix wrong bit of docs. * adi,ad5791 - Typos * adi,ad9834 - Switch to device managed functions in probe. * adi,adis* - Add and use helpers for locking to reduced duplication. * adi,adis16480 - Fix calculation of sampling frequency when using pulse per second input. * adi,adis16475 - Calculate the IMU scaled internal sampling rate and runtime depending on sysfs based configuration rather than getting from DT. Drop now unnecessary property from DT bindings doc. * cros_ec - Fix result of a series of recent changes that means extended buffer attributes turn up in the wrong place. Too complex to revert the various patches unfortunately so this is a bit messy. * fsl,mma3452 - Indentation cleanup. * hid-sensors - Size of storage needs to increase for some parts when using quaternions. - Move the get sensistivity attribute to hid-sensors-common to reduce duplication. Enable it for more device types. - Correctly handle relative sensitivity if reported that way including documenting the new ABI. * maxim,max517 - Use device managed functions in probe. * mediatek,mt6360-adc - Use asm/unaligned.h instead of directly including unaligned/be_byteshift.h * novuton,npcm-adc - Local lock instead of missusing mlock. * semtech,sx9500 - Typos * st,sensor - typo fix * st,spear-adc - Local lock instead of missusing mlock. * st,stm32-adc - Long standing HAS_IOMEM dependency fix. * st,stm32-counter - Remove left over deprecated IIO counter ABI. * ti,palmas-adc - Local lock instead of missusing mlock. * ti,tmp007 - Switch to device managed functions in probe. Other * MAINTAINERS - Move Peter Meerwald-Stadler to Credits at his request * tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (119 commits) iio: acpi_als: Add trigger support iio: acpi_als: Add local variable dev in probe iio: acpi_als: Add timestamp channel iio: adc: ad7292: Modify the bool initialization assignment iio: cros: unify hw fifo attributes without API changes iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant iio: event_monitor: Enable events before monitoring dt-bindings: iio: adc: Add compatible for Mediatek MT8195 iio:magnetometer: Add Support for ST IIS2MDC dt-bindings: iio: st,st-sensors add IIS2MDC. staging: iio: ad9832: kernel-doc fixes iio:dac:max517.c: Use devm_iio_device_register() iio:cros_ec_sensors: Fix a wrong function name in kernel doc. iio: buffer: kfifo_buf: kernel-doc, typo in function name. iio: accel: sca3000: kernel-doc fixes. Missing - and wrong function names. iio: adc: adi-axi-adc: Drop false marking for kernel-doc iio: adc: cpcap-adc: kernel-doc fix - that should be _ in structure name iio: dac: ad5504: fix wrong part number in kernel-doc structure name. iio: dac: ad5770r: kernel-doc fix case of letter R wrong in structure name iio: adc: ti-adc084s021: kernel-doc fixes, missing function names ...
2 parents d010995 + 1b33dfa commit 9c15db9

File tree

212 files changed

+5949
-2277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+5949
-2277
lines changed

CREDITS

+8
Original file line numberDiff line numberDiff line change
@@ -2536,6 +2536,14 @@ D: Linux/PARISC hacker
25362536
D: AD1889 sound driver
25372537
S: Ottawa, Canada
25382538

2539+
N: Peter Meerwald-Stadler
2540+
E: pmeerw@pmeerw.net
2541+
W: https://pmeerw.net
2542+
D: IIO reviewing, drivers
2543+
S: Schießstandstr. 3a
2544+
S: A-5061 Elsbethen
2545+
S: Austria
2546+
25392547
N: Dirk Melchers
25402548
E: dirk@merlin.nbg.sub.org
25412549
D: 8 bit XT hard disk driver for OMTI5520

Documentation/ABI/testing/sysfs-bus-iio

+140
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,52 @@ Description:
3333
Description of the physical chip / device for device X.
3434
Typically a part number.
3535

36+
What: /sys/bus/iio/devices/iio:deviceX/label
37+
KernelVersion: 5.8
38+
Contact: linux-iio@vger.kernel.org
39+
Description:
40+
Optional symbolic label for a device.
41+
This is useful for userspace to be able to better identify an
42+
individual device.
43+
44+
The contents of the label are free-form, but there are some
45+
standardized uses:
46+
47+
For proximity sensors which give the proximity (of a person) to
48+
a certain wlan or wwan antenna the following standardized labels
49+
are used:
50+
51+
* "proximity-wifi"
52+
* "proximity-lte"
53+
* "proximity-wifi-lte"
54+
* "proximity-wifi-left"
55+
* "proximity-wifi-right"
56+
57+
These are used to indicate to userspace that these proximity
58+
sensors may be used to tune transmit power to ensure that
59+
Specific Absorption Rate (SAR) limits are honored.
60+
The "-left" and "-right" labels are for devices with multiple
61+
antennas.
62+
63+
In some laptops/tablets the standardized proximity sensor labels
64+
instead indicate proximity to a specific part of the device:
65+
66+
* "proximity-palmrest" indicates proximity to the keyboard's palmrest
67+
* "proximity-palmrest-left" indicates proximity to the left part of the palmrest
68+
* "proximity-palmrest-right" indicates proximity to the right part of the palmrest
69+
* "proximity-lap" indicates the device is being used on someone's lap
70+
71+
Note "proximity-lap" is special in that its value may be
72+
calculated by firmware from other sensor readings, rather then
73+
being a raw sensor reading.
74+
75+
For accelerometers used in 2-in-1s with 360° (yoga-style) hinges,
76+
which have an accelerometer in both their base and their display,
77+
the following standardized labels are used:
78+
79+
* "accel-base"
80+
* "accel-display"
81+
3682
What: /sys/bus/iio/devices/iio:deviceX/current_timestamp_clock
3783
KernelVersion: 4.5
3884
Contact: linux-iio@vger.kernel.org
@@ -1118,24 +1164,33 @@ Description:
11181164

11191165
What: /sys/bus/iio/devices/iio:deviceX/buffer/length
11201166
KernelVersion: 2.6.35
1167+
What: /sys/bus/iio/devices/iio:deviceX/bufferY/length
1168+
KernelVersion: 5.11
11211169
Contact: linux-iio@vger.kernel.org
11221170
Description:
11231171
Number of scans contained by the buffer.
11241172

11251173
What: /sys/bus/iio/devices/iio:deviceX/buffer/enable
11261174
KernelVersion: 2.6.35
1175+
What: /sys/bus/iio/devices/iio:deviceX/bufferY/enable
1176+
KernelVersion: 5.11
11271177
Contact: linux-iio@vger.kernel.org
11281178
Description:
11291179
Actually start the buffer capture up. Will start trigger
11301180
if first device and appropriate.
11311181

11321182
What: /sys/bus/iio/devices/iio:deviceX/scan_elements
11331183
KernelVersion: 2.6.37
1184+
What: /sys/bus/iio/devices/iio:deviceX/bufferY
1185+
KernelVersion: 5.11
11341186
Contact: linux-iio@vger.kernel.org
11351187
Description:
11361188
Directory containing interfaces for elements that will be
11371189
captured for a single triggered sample set in the buffer.
11381190

1191+
Since kernel 5.11 the scan_elements attributes are merged into
1192+
the bufferY directory, to be configurable per buffer.
1193+
11391194
What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en
11401195
What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en
11411196
What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en
@@ -1164,6 +1219,34 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
11641219
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
11651220
What: /sys/.../iio:deviceX/scan_elements/in_proximity_en
11661221
KernelVersion: 2.6.37
1222+
What: /sys/.../iio:deviceX/bufferY/in_accel_x_en
1223+
What: /sys/.../iio:deviceX/bufferY/in_accel_y_en
1224+
What: /sys/.../iio:deviceX/bufferY/in_accel_z_en
1225+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_en
1226+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_en
1227+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_en
1228+
What: /sys/.../iio:deviceX/bufferY/in_magn_x_en
1229+
What: /sys/.../iio:deviceX/bufferY/in_magn_y_en
1230+
What: /sys/.../iio:deviceX/bufferY/in_magn_z_en
1231+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_en
1232+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_en
1233+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_en
1234+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_en
1235+
What: /sys/.../iio:deviceX/bufferY/in_timestamp_en
1236+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_en
1237+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_en
1238+
What: /sys/.../iio:deviceX/bufferY/in_voltageY-voltageZ_en
1239+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_en
1240+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_en
1241+
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_en
1242+
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_en
1243+
What: /sys/.../iio:deviceX/bufferY/in_incli_x_en
1244+
What: /sys/.../iio:deviceX/bufferY/in_incli_y_en
1245+
What: /sys/.../iio:deviceX/bufferY/in_pressureY_en
1246+
What: /sys/.../iio:deviceX/bufferY/in_pressure_en
1247+
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_en
1248+
What: /sys/.../iio:deviceX/bufferY/in_proximity_en
1249+
KernelVersion: 5.11
11671250
Contact: linux-iio@vger.kernel.org
11681251
Description:
11691252
Scan element control for triggered data capture.
@@ -1185,6 +1268,23 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
11851268
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
11861269
What: /sys/.../iio:deviceX/scan_elements/in_proximity_type
11871270
KernelVersion: 2.6.37
1271+
What: /sys/.../iio:deviceX/bufferY/in_accel_type
1272+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_type
1273+
What: /sys/.../iio:deviceX/bufferY/in_magn_type
1274+
What: /sys/.../iio:deviceX/bufferY/in_incli_type
1275+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_type
1276+
What: /sys/.../iio:deviceX/bufferY/in_voltage_type
1277+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_type
1278+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_type
1279+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_type
1280+
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_type
1281+
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_type
1282+
What: /sys/.../iio:deviceX/bufferY/in_timestamp_type
1283+
What: /sys/.../iio:deviceX/bufferY/in_pressureY_type
1284+
What: /sys/.../iio:deviceX/bufferY/in_pressure_type
1285+
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_type
1286+
What: /sys/.../iio:deviceX/bufferY/in_proximity_type
1287+
KernelVersion: 5.11
11881288
Contact: linux-iio@vger.kernel.org
11891289
Description:
11901290
Description of the scan element data storage within the buffer
@@ -1241,6 +1341,33 @@ What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
12411341
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
12421342
What: /sys/.../iio:deviceX/scan_elements/in_proximity_index
12431343
KernelVersion: 2.6.37
1344+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_index
1345+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_supply_index
1346+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_i_index
1347+
What: /sys/.../iio:deviceX/bufferY/in_voltageY_q_index
1348+
What: /sys/.../iio:deviceX/bufferY/in_voltage_i_index
1349+
What: /sys/.../iio:deviceX/bufferY/in_voltage_q_index
1350+
What: /sys/.../iio:deviceX/bufferY/in_accel_x_index
1351+
What: /sys/.../iio:deviceX/bufferY/in_accel_y_index
1352+
What: /sys/.../iio:deviceX/bufferY/in_accel_z_index
1353+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_index
1354+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_index
1355+
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_index
1356+
What: /sys/.../iio:deviceX/bufferY/in_magn_x_index
1357+
What: /sys/.../iio:deviceX/bufferY/in_magn_y_index
1358+
What: /sys/.../iio:deviceX/bufferY/in_magn_z_index
1359+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_index
1360+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_index
1361+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_magnetic_tilt_comp_index
1362+
What: /sys/.../iio:deviceX/bufferY/in_rot_from_north_true_tilt_comp_index
1363+
What: /sys/.../iio:deviceX/bufferY/in_incli_x_index
1364+
What: /sys/.../iio:deviceX/bufferY/in_incli_y_index
1365+
What: /sys/.../iio:deviceX/bufferY/in_timestamp_index
1366+
What: /sys/.../iio:deviceX/bufferY/in_pressureY_index
1367+
What: /sys/.../iio:deviceX/bufferY/in_pressure_index
1368+
What: /sys/.../iio:deviceX/bufferY/in_rot_quaternion_index
1369+
What: /sys/.../iio:deviceX/bufferY/in_proximity_index
1370+
KernelVersion: 5.11
12441371
Contact: linux-iio@vger.kernel.org
12451372
Description:
12461373
A single positive integer specifying the position of this
@@ -1455,6 +1582,8 @@ Description:
14551582

14561583
What: /sys/bus/iio/devices/iio:deviceX/buffer/watermark
14571584
KernelVersion: 4.2
1585+
What: /sys/bus/iio/devices/iio:deviceX/bufferY/watermark
1586+
KernelVersion: 5.11
14581587
Contact: linux-iio@vger.kernel.org
14591588
Description:
14601589
A single positive integer specifying the maximum number of scan
@@ -1473,6 +1602,8 @@ Description:
14731602

14741603
What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available
14751604
KernelVersion: 4.16
1605+
What: /sys/bus/iio/devices/iio:deviceX/bufferY/data_available
1606+
KernelVersion: 5.11
14761607
Contact: linux-iio@vger.kernel.org
14771608
Description:
14781609
A read-only value indicating the bytes of data available in the
@@ -1823,3 +1954,12 @@ Description:
18231954
hinge, keyboard, screen. It means the three channels
18241955
each correspond respectively to hinge angle, keyboard angle,
18251956
and screen angle.
1957+
1958+
What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_hysteresis_relative
1959+
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_hysteresis_relative
1960+
KernelVersion: 5.12
1961+
Contact: linux-iio@vger.kernel.org
1962+
Description:
1963+
Specify the percent for light sensor relative to the channel
1964+
absolute value that a data field should change before an event
1965+
is generated. Units are a percentage of the prior reading.

Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8

-133
This file was deleted.

Documentation/ABI/testing/sysfs-bus-iio-distance-srf08

-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
What: /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
2-
Date: January 2017
3-
KernelVersion: 4.11
4-
Contact: linux-iio@vger.kernel.org
5-
Description:
6-
Show or set the gain boost of the amp, from 0-31 range.
7-
default 31
8-
91
What: /sys/bus/iio/devices/iio:deviceX/sensor_max_range
102
Date: January 2017
113
KernelVersion: 4.11

Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc2010 renamed to Documentation/ABI/testing/sysfs-bus-iio-humidity

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ Description:
66
Controls the heater device within the humidity sensor to get
77
rid of excess condensation.
88

9-
Valid control values are 0 = OFF, and 1 = ON.
9+
In some devices, this is just a switch in which case 0 = OFF,
10+
and 1 = ON.

Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x

-9
This file was deleted.

0 commit comments

Comments
 (0)