Skip to content

Commit b4b6cc1

Browse files
committed
Merge tag 'iio-for-6.7a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: IIO: 1st set of new device support, features and cleanup for 6.7 Particularly great to see a resolver driver move out of staging via a massive set of changes. Only took 13 years :) One small patch added then reverted due to a report of test breakage (ashai-kasei,ak8975: Drop deprecated enums.) An immutable branch was used for some hid-senors changes in case there was a need to take them into the HID tree as well. New device support ----------------- adi,hmc425a - Add support for HMC540SLP3E broadband 4-bit digital attenuator. kionix,kx022a - Add support for the kx132-1211 accelerometer. Require significant driver rework to enable this including add a chip type specific structure to deal with the chip differences. - Add support for the kx132acr-lbz accelerometer (subset of the kx022a feature set). lltc,ltc2309 - New driver for this 8 channel ADC. microchip,mcp3911 - Add support for rest of mcp391x family of ADCs (there are various differences beyond simple channel count variation. Series includes some general driver cleanup. microchip,mcp3564 - New driver for MCP3461, MCP3462, MCP3464, MCP3541, MCP3562, MCP3564 and their R variants of 16/24bit ADCs. A few minor fixed followed. rohm,bu1390 - New driver for this pressure sensor. Staging graduation ------------------ adi,ad1210 (after 13 or so years :) - More or less a complete (step-wise) rewrite of this resolver driver to bring it up to date with modern IIO standards. The fault signal handling mapping to event channels was particularly complex and significant part of the changes. Features -------- iio-core - Add chromacity and color temperature channel types. adi,ad7192 - Oversampling ratio control (called fast settling in datasheet). adi,adis16475 - Add core support and then driver support for delta angle and delta velocity channels. These are intended for summation to establish angle and velocity changes over larger timescales. Fix was needed for alignment after the temperature channel. Further fix reduced set of devices for which the buffer support was applicable as seems burst reads don't cover these on all devices. hid-sensors-als - Chromacity and color temperatures support including in amd sfh. stx104 - Add support for counter subsystem to this multipurpose device. ti,twl6030 - Add missing device tree binding description. Clean up and minor fixes. ------------------------ treewide - Drop some unused declarations across IIO. - Make more use of device_get_match_data() instead of OF specific approaches. Similar cleanup to sets of drivers. - Stop platform remove callbacks returning anything by using the temporary remove_new() callback. - Use i2c_get_match_data() to cope nicely with all types of ID table entry. - Use device_get_match_data() for various platform device to cope with more types of firmware. - Convert from enum to pointer in ID tables allowing use of i2c_get_match_data(). - Fix sorting on some ID tables. - Include specific string helper headers rather than simply string_helpers.h docs - Better description of the ordering requirements etc for available_scan_masks. tools - Handle alignment of mixed sizes where the last element isn't the biggest correctly. Seems that doesn't happen often! adi,ad2s1210 - Lots of work from David Lechner on this driver including a few fixes that are going with the rework to avoid slowing that down. adi,ad4310 - Replace deprecated devm_clk_register() adi,ad74413r - Bring the channel function setting inline with the datasheet. adi,ad7192 - Change to FIELD_PREP(), FIELD_GET(). - Calculate f_order from the sinc filter and chop filter states. - Move more per chip config into data in struct ad7192_chip_info - Cleanup unused parameter in channel macros. adi,adf4350 - Make use of devm_* to simplify error handling for many of the setup calls in probe() / tear down in remove() and error paths. Some more work to be done on this one. - Use dev_err_probe() for errors in probe() callback. adi,adf4413 - Typo in function name prefix. adi,adxl345 - Add channel scale to the chip type specific structure and drop using a type field previously used for indirection. asahi,ak8985 - Fix a mismatch introduced when switching from enum->pointers in the match tables. amlogic,meson - Expand error logging during probe. invensense,mpu6050 - Support level-shifter control. Whilst no one is sure exactly what this is doing it is needed for some old boards. - Document mount-matrix dt-binding. mediatek,mt6577 - Use devm_clk_get_enabled() to replace open coded version and move everything over to being device managed. Drop now empty remove() callback. Fix follows to put the drvdata back. - Use dev_err_probe() for error reporting in probe() callback. memsic,mxc4005 - Add of_match_table. microchip,mcp4725 - Move various chip specific data from being looked up by chip ID to data in the chip type specific structure. silicon-labs,si7005 - Add of_match_table and entry in trivial-devices.yaml st,lsm6dsx - Add missing mount-matrix dt binding documentation. st,spear - Use devm_clk_get_enabled() and some other devm calls to move everything over to being device managed. Drop now empty remove() callback. - Use dev_err_probe() to better handled deferred probing and tidy up error reporting in probe() callback. st,stm32-adc - Add a bit of additional checking in probe() to protect against a NULL pointer (no known path to trigger it today). - Replace deprecated strncpy() ti,ads1015 - Allow for edge triggers. - Document interrupt in dt-bindings. * tag 'iio-for-6.7a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (201 commits) iio: Use device_get_match_data() iio: adc: MCP3564: fix warn: unsigned '__x' is never less than zero. dt-bindings: trivial-devices: add silabs,si7005 iio: si7005: Add device tree support drivers: imu: adis16475.c: Remove scan index from delta channels dt-bindings: iio: imu: st,lsm6dsx: add mount-matrix property iio: resolver: ad2s1210: remove of_match_ptr() iio: resolver: ad2s1210: remove DRV_NAME macro iio: resolver: ad2s1210: move out of staging staging: iio: resolver: ad2s1210: simplify code with guard(mutex) staging: iio: resolver: ad2s1210: clear faults after soft reset staging: iio: resolver: ad2s1210: refactor sample toggle staging: iio: resolver: ad2s1210: remove fault attribute staging: iio: resolver: ad2s1210: add label attribute support staging: iio: resolver: ad2s1210: add register/fault support summary staging: iio: resolver: ad2s1210: implement fault events iio: event: add optional event label support staging: iio: resolver: ad2s1210: rename DOS reset min/max attrs staging: iio: resolver: ad2s1210: convert DOS mismatch threshold to event attr staging: iio: resolver: ad2s1210: convert DOS overrange threshold to event attr ...
2 parents f7572e9 + 89a1d2f commit b4b6cc1

147 files changed

Lines changed: 7205 additions & 2002 deletions

File tree

Some content is hidden

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

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,35 @@ Description:
279279
but should match other such assignments on device).
280280
Units after application of scale and offset are m/s^2.
281281

282+
What: /sys/bus/iio/devices/iio:deviceX/in_deltaangl_x_raw
283+
What: /sys/bus/iio/devices/iio:deviceX/in_deltaangl_y_raw
284+
What: /sys/bus/iio/devices/iio:deviceX/in_deltaangl_z_raw
285+
KernelVersion: 6.5
286+
Contact: linux-iio@vger.kernel.org
287+
Description:
288+
Angular displacement between two consecutive samples on x, y or
289+
z (may be arbitrarily assigned but should match other such
290+
assignments on device).
291+
In order to compute the total angular displacement during a
292+
desired period of time, the application should sum-up the delta
293+
angle samples acquired during that time.
294+
Units after application of scale and offset are radians.
295+
296+
What: /sys/bus/iio/devices/iio:deviceX/in_deltavelocity_x_raw
297+
What: /sys/bus/iio/devices/iio:deviceX/in_deltavelocity_y_raw
298+
What: /sys/bus/iio/devices/iio:deviceX/in_deltavelocity_z_raw
299+
KernelVersion: 6.5
300+
Contact: linux-iio@vger.kernel.org
301+
Description:
302+
The linear velocity change between two consecutive samples on x,
303+
y or z (may be arbitrarily assigned but should match other such
304+
assignments on device).
305+
In order to compute the total linear velocity change during a
306+
desired period of time, the application should sum-up the delta
307+
velocity samples acquired during that time.
308+
Units after application of scale and offset are meters per
309+
second.
310+
282311
What: /sys/bus/iio/devices/iio:deviceX/in_angl_raw
283312
What: /sys/bus/iio/devices/iio:deviceX/in_anglY_raw
284313
KernelVersion: 4.17
@@ -461,6 +490,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale
461490
What: /sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale
462491
What: /sys/bus/iio/devices/iio:deviceX/in_illuminance_scale
463492
What: /sys/bus/iio/devices/iio:deviceX/in_countY_scale
493+
What: /sys/bus/iio/devices/iio:deviceX/in_deltaangl_scale
494+
What: /sys/bus/iio/devices/iio:deviceX/in_deltavelocity_scale
464495
What: /sys/bus/iio/devices/iio:deviceX/in_angl_scale
465496
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_x_scale
466497
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_y_scale
@@ -1332,6 +1363,12 @@ Description:
13321363
What: /sys/.../iio:deviceX/bufferY/in_accel_x_en
13331364
What: /sys/.../iio:deviceX/bufferY/in_accel_y_en
13341365
What: /sys/.../iio:deviceX/bufferY/in_accel_z_en
1366+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_x_en
1367+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_y_en
1368+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_z_en
1369+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_x_en
1370+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_y_en
1371+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_z_en
13351372
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_en
13361373
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_en
13371374
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_en
@@ -1362,6 +1399,8 @@ Description:
13621399
Scan element control for triggered data capture.
13631400

13641401
What: /sys/.../iio:deviceX/bufferY/in_accel_type
1402+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_type
1403+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_type
13651404
What: /sys/.../iio:deviceX/bufferY/in_anglvel_type
13661405
What: /sys/.../iio:deviceX/bufferY/in_magn_type
13671406
What: /sys/.../iio:deviceX/bufferY/in_incli_type
@@ -1416,6 +1455,12 @@ What: /sys/.../iio:deviceX/bufferY/in_voltage_q_index
14161455
What: /sys/.../iio:deviceX/bufferY/in_accel_x_index
14171456
What: /sys/.../iio:deviceX/bufferY/in_accel_y_index
14181457
What: /sys/.../iio:deviceX/bufferY/in_accel_z_index
1458+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_x_index
1459+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_y_index
1460+
What: /sys/.../iio:deviceX/bufferY/in_deltaangl_z_index
1461+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_x_index
1462+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_y_index
1463+
What: /sys/.../iio:deviceX/bufferY/in_deltavelocity_z_index
14191464
What: /sys/.../iio:deviceX/bufferY/in_anglvel_x_index
14201465
What: /sys/.../iio:deviceX/bufferY/in_anglvel_y_index
14211466
What: /sys/.../iio:deviceX/bufferY/in_anglvel_z_index
@@ -2179,3 +2224,33 @@ Contact: linux-iio@vger.kernel.org
21792224
Description:
21802225
Number of conditions that must occur, during a running
21812226
period, before an event is generated.
2227+
2228+
What: /sys/bus/iio/devices/iio:deviceX/in_colortemp_raw
2229+
KernelVersion: 6.7
2230+
Contact: linux-iio@vger.kernel.org
2231+
Description:
2232+
Represents light color temperature, which measures light color
2233+
temperature in Kelvin.
2234+
2235+
What: /sys/bus/iio/devices/iio:deviceX/in_chromaticity_x_raw
2236+
What: /sys/bus/iio/devices/iio:deviceX/in_chromaticity_y_raw
2237+
KernelVersion: 6.7
2238+
Contact: linux-iio@vger.kernel.org
2239+
Description:
2240+
The x and y light color coordinate on the CIE 1931 chromaticity
2241+
diagram.
2242+
2243+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltageY_mag_either_label
2244+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltageY_mag_rising_label
2245+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltageY_thresh_falling_label
2246+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltageY_thresh_rising_label
2247+
What: /sys/bus/iio/devices/iio:deviceX/events/in_anglvelY_mag_rising_label
2248+
What: /sys/bus/iio/devices/iio:deviceX/events/in_anglY_thresh_rising_label
2249+
What: /sys/bus/iio/devices/iio:deviceX/events/in_phaseY_mag_rising_label
2250+
KernelVersion: 6.7
2251+
Contact: linux-iio@vger.kernel.org
2252+
Description:
2253+
Optional symbolic label to a device channel event.
2254+
If a label is defined for this event add that to the event
2255+
specific attributes. This is useful for userspace to be able to
2256+
better identify an individual event.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/boost_current_gain
2+
KernelVersion: 6.4
3+
Contact: linux-iio@vger.kernel.org
4+
Description:
5+
This attribute is used to set the gain of the biasing current
6+
circuit of the Delta-Sigma modulator. The different BOOST
7+
settings are applied to the entire modulator circuit, including
8+
the voltage reference buffers.
9+
10+
What: /sys/bus/iio/devices/iio:deviceX/boost_current_gain_available
11+
KernelVersion: 6.4
12+
Contact: linux-iio@vger.kernel.org
13+
Description:
14+
Reading returns a list with the possible gain values for
15+
the current biasing circuit of the Delta-Sigma modulator.
16+
17+
What: /sys/bus/iio/devices/iio:deviceX/auto_zeroing_mux_enable
18+
KernelVersion: 6.4
19+
Contact: linux-iio@vger.kernel.org
20+
Description:
21+
This attribute is used to enable the analog input multiplexer
22+
auto-zeroing algorithm (the input multiplexer and the ADC
23+
include an offset cancellation algorithm that cancels the offset
24+
contribution of the ADC). When the offset cancellation algorithm
25+
is enabled, ADC takes two conversions, one with the differential
26+
input as VIN+/VIN-, one with VIN+/VIN- inverted. In this case the
27+
conversion time is multiplied by two compared to the default
28+
case where the algorithm is disabled. This technique allows the
29+
cancellation of the ADC offset error and the achievement of
30+
ultra-low offset without any digital calibration. The resulting
31+
offset is the residue of the difference between the two
32+
conversions, which is on the order of magnitude of the noise
33+
floor. This offset is effectively canceled at every conversion,
34+
so the residual offset error temperature drift is extremely low.
35+
Write '1' to enable it, write '0' to disable it.
36+
37+
What: /sys/bus/iio/devices/iio:deviceX/auto_zeroing_ref_enable
38+
KernelVersion: 6.4
39+
Contact: linux-iio@vger.kernel.org
40+
Description:
41+
This attribute is used to enable the chopping algorithm for the
42+
internal voltage reference buffer. This setting has no effect
43+
when external voltage reference is selected.
44+
Internal voltage reference buffer injects a certain quantity of
45+
1/f noise into the system that can be modulated with the
46+
incoming input signals and can limit the SNR performance at
47+
higher Oversampling Ratio values (over 256). To overcome this
48+
limitation, the buffer includes an auto-zeroing algorithm that
49+
greatly reduces (cancels out) the 1/f noise and cancels the
50+
offset value of the reference buffer. As a result, the SNR of
51+
the system is not affected by this 1/f noise component of the
52+
reference buffer, even at maximum oversampling ratio values.
53+
Write '1' to enable it, write '0' to disable it.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltage0_mag_rising_reset_max
2+
KernelVersion: 6.7
3+
Contact: linux-iio@vger.kernel.org
4+
Description:
5+
Reading returns the current Degradation of Signal Reset Maximum
6+
Threshold value in millivolts. Writing sets the value.
7+
8+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltage0_mag_rising_reset_max_available
9+
KernelVersion: 6.7
10+
Contact: linux-iio@vger.kernel.org
11+
Description:
12+
Reading returns the allowable voltage range for
13+
in_altvoltage0_mag_rising_reset_max.
14+
15+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltage0_mag_rising_reset_min
16+
KernelVersion: 6.7
17+
Contact: linux-iio@vger.kernel.org
18+
Description:
19+
Reading returns the current Degradation of Signal Reset Minimum
20+
Threshold value in millivolts. Writing sets the value.
21+
22+
What: /sys/bus/iio/devices/iio:deviceX/events/in_altvoltage0_mag_rising_reset_min_available
23+
KernelVersion: 6.7
24+
Contact: linux-iio@vger.kernel.org
25+
Description:
26+
Reading returns the allowable voltage range for
27+
in_altvoltage0_mag_rising_reset_min.

Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
$id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: ROHM/Kionix KX022A Accelerometer
7+
title: ROHM/Kionix KX022A, KX132-1211 and KX132ACR-LBZ Accelerometers
88

99
maintainers:
1010
- Matti Vaittinen <mazziesaccount@gmail.com>
1111

1212
description: |
13-
KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges,
14-
output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering.
15-
KX022A can be accessed either via I2C or SPI.
13+
KX022A, KX132ACR-LBZ and KX132-1211 are 3-axis accelerometers supporting
14+
+/- 2G, 4G, 8G and 16G ranges, variable output data-rates and a
15+
hardware-fifo buffering. These accelerometers can be accessed either
16+
via I2C or SPI.
1617
1718
properties:
1819
compatible:
19-
const: kionix,kx022a
20+
enum:
21+
- kionix,kx022a
22+
- kionix,kx132-1211
23+
- rohm,kx132acr-lbz
2024

2125
reg:
2226
maxItems: 1

Documentation/devicetree/bindings/iio/adc/lltc,ltc2497.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,31 @@
44
$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2497.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Linear Technology / Analog Devices LTC2497 ADC
7+
title: Linear Technology / Analog Devices LTC2497 and LTC2309 ADC
88

99
maintainers:
1010
- Michael Hennerich <michael.hennerich@analog.com>
11+
- Liam Beguin <liambeguin@gmail.com>
1112

1213
description: |
13-
16bit ADC supporting up to 16 single ended or 8 differential inputs.
14-
I2C interface.
14+
LTC2309:
15+
low noise, low power, 8-channel, 12-bit successive approximation ADC with an
16+
I2C compatible serial interface.
1517
16-
https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
17-
https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
18+
https://www.analog.com/media/en/technical-documentation/data-sheets/2309fd.pdf
19+
20+
LTC2497:
21+
LTC2499:
22+
16bit ADC supporting up to 16 single ended or 8 differential inputs.
23+
I2C interface.
24+
25+
https://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf
26+
https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
1827
1928
properties:
2029
compatible:
2130
enum:
31+
- lltc,ltc2309
2232
- lltc,ltc2497
2333
- lltc,ltc2499
2434

0 commit comments

Comments
 (0)