Skip to content

Commit a425990

Browse files
committed
Merge tag 'iio-for-6.15a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: IIO: New device support, features and cleanup for the 6.15 cycle. The usual mixture of new drivers, support in existing drivers for new devices, a range of features and general subsystem cleanup. Two merges of immutable branches in here: * SPI offload support. Culmination of a long effort to bring the ability to offload triggered sequences of SPI operations to specific hardware, allow high datarate acquisition over an SPI bus (if you have the right hardware / FPGA firmware) * GPIO set-array-helper - enables code simplification. New device support ================== adi,ad3552r-hs: - Add support for AD3541r and AD3542r via newly supported FPGA HDL. adi,ad4030 - New driver supporting the AD4030, AD4630 AD4630-16, AD4640-24, AD4632-16, AD4632-24 1 and 2 channel high precision SPI ADCs. adi,ad4851 - New driver and backend support for the AD4851, AD4852, AD4853, AD4854, AD4855, AD4846, AD4857, AD4858 and AD4858I high speed multichannel simultaneous sampling ADCs. adi,ad7191 - New driver for this 24-bit ADC for precision bridge applications, adi,ad7380 - Add support for the adaq4381-4 which is a 14-bit version of the already supported adaq4380-1 adi,adis16550 - New driver using the ADIS library (which needed extensions) for this IMU. brcm,apds9160 - New driver for this proximity and ambient light sensor. dynaimage,al3000a - New driver for this illuminance sensor. mcube,mc3230 - Add support for the mc3510c accelerometer with a different scale to existing supported parts (some rework preceded this) nxp,imx93 - Add compatibles for imx94 and imx95 which are fully compatible with imx93. rockchip,saradc - Add support for the RK3528 ADC - Add support for the RK3562 ADC silab,si7210 - New driver to support this I2C Hall effect magnetic position sensor. ti,ads7138 - New driver supporting the ADS7128 and AD7138 I2C ADCs. Staging driver drop =================== adi,adis16240 - Drop this impact sensor. Interesting part but complex hence never left staging due to ABI challenges. No longer readily available so drop driver. New features ============ Documentation - A really nice overview document introduce ADC terminology and how it maps to IIO. core - New description for FAULT events, used in the ad7173. - filter_type ABI used in ad4130. buffer-dmaengine - Split DMA channel request from buffer allocation (for SPI offload) - Add a new _with_handle setup variant. (for SPI offload) adi,adf4371 - Add control of reference clock type and support for frequency doubling where appropriate. adi,ad4695 - Support SPI offload. - Support oversampling control. adi,ad5791 - Support SPI offload. adi,ad7124 - Add channel calibration support. adi,ad7380: - Alert support (threshold interrupts) - SPI offload support. adi,ad7606 - Support writing registers when using backend enabling software control of modes. adi,ad7944 - Support SPI offload. adi,ad9832 - Use devm_regulator_get_enable() to simplify code. adi,ad9834 - Use devm_regulator_get_enable() to simplify code. adi,adxl345 - Improve IRQ handling code. - Add debug access to registers. bosch,bmi270 - Add temperature channel support. - Add data ready trigger. google,cross_ec - Add trace events. mcube,mc3230 - Add mount matrix support - Add an OF match table. Cleanup and minor bug fixes =========================== Tree wide: - Stop using iio_device_claim_direct_scoped() and introduce sparse friendly iio_device_claim/release_direct() The conditional scoped cleanup has proved hard to deal with, requiring workarounds for various compiler issues and in is rather non-intuitive so abandon that experiment. One of the attractions of that approach was that it made it much harder to have unbalanced claim/release bugs so instead introduce a conditional-lock style boolean returning new pair of functions. These are inline in the header and have __acquire and __release calls allowing sparse to detect lack of balance. There are occasional false positives but so far those have reflected complex code paths that benefited from cleanup anyway. The first set of driver conversions are in this pull request, more to follow next cycle. Various related cleanup in drivers. Removal of the _scoped code is completed and the definition removed. - Use of str_enable_disable() and similar helpers. - Don't set regmap cache to REGCACHE_NONE as that's the default anyway. - Change some caches from RBTREE to MAPLE reflecting best practice. - Use the new gpiod_multi_set_value_cansleep() - Make sure to grab direct mode for some calibrations paths. - Avoid using memcmp on structures when checking for matching channel configs. Instead just match field by field. dt-bindings: - Fix up indentation inconsistencies. gts-helper: - Simplify building of available scale table. adi,ad-sigma-delta - Make sure to disable channel after calibration done. - Add error handling in configuring channel during calibration. adi,ad2s1201 - use a bitmap_write() rather than directly accessing underlying storage. adi,ad3552r-hs - Fix a wrong error message. - Make sure to use instruction mode for configuration. adi,ad4695 - Add a conversion to ensure exit from conversion mode. - Use custom regmap to handle required sclk rate change. - Fix an out of bounds array access - Simplify oversampling ratio handling. adi,ad4851 - Fix a sign bug. adi,ad5791 - Fix wrong exported number of storage bits. adi,ad7124 - Disable all channels at probe to avoid strange initial configurations. adi,ad7173 - Rework to allow static const struct ad_sigma_delta without need to make a copy. adi,ad7623 - Drop a BSD license tag that the authors consider unnecessary. adi,ad7768-1 - Fix channels sign description exposed to user space. - Set MOSI idle state to avoid accidental device reset. - Avoid some overkill locking. adi,axi-dac - Check if device interface is busy when enabling data stream. - Add control of bus mode. bosch,bmi270 - Move a struct definition to a c file as only used there. vishay,veml6030 - Enable regmap cache to reduce bus traffic. - Fix ABI bug around scale reporting. vishay,vem6075 - Check array bounds to harden against broken hardware. Various other minor tweaks and fixes not called out. * * tag 'iio-for-6.15a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (223 commits) doc: iio: ad7380: describe offload support iio: ad7380: add support for SPI offload iio: light: Add check for array bounds in veml6075_read_int_time_ms iio: adc: ti-ads7924 Drop unnecessary function parameters staging: iio: ad9834: Use devm_regulator_get_enable() staging: iio: ad9832: Use devm_regulator_get_enable() iio: gyro: bmg160_spi: add of_match_table dt-bindings: iio: adc: Add i.MX94 and i.MX95 support iio: adc: ad7768-1: remove unnecessary locking Documentation: ABI: add wideband filter type to sysfs-bus-iio iio: adc: ad7768-1: set MOSI idle state to prevent accidental reset iio: adc: ad7768-1: Fix conversion result sign iio: adc: ad7124: Benefit of dev = indio_dev->dev.parent in ad7124_parse_channel_config() iio: adc: ad7124: Implement system calibration iio: adc: ad7124: Implement internal calibration at probe time iio: adc: ad_sigma_delta: Add error checking for ad_sigma_delta_set_channel() iio: adc: ad4130: Adapt internal names to match official filter_type ABI iio: adc: ad7173: Fix comparison of channel configs iio: adc: ad7124: Fix comparison of channel configs iio: adc: ad4130: Fix comparison of channel setups ...
2 parents 34ff799 + 8dbeb41 commit a425990

File tree

181 files changed

+16873
-3075
lines changed

Some content is hidden

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

181 files changed

+16873
-3075
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ Description:
22682268
representing the sensor unique ID number.
22692269

22702270
What: /sys/bus/iio/devices/iio:deviceX/filter_type_available
2271-
What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
2271+
What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_type_available
22722272
KernelVersion: 6.1
22732273
Contact: linux-iio@vger.kernel.org
22742274
Description:
@@ -2290,6 +2290,16 @@ Description:
22902290
* "sinc3+pf2" - Sinc3 + device specific Post Filter 2.
22912291
* "sinc3+pf3" - Sinc3 + device specific Post Filter 3.
22922292
* "sinc3+pf4" - Sinc3 + device specific Post Filter 4.
2293+
* "wideband" - filter with wideband low ripple passband
2294+
and sharp transition band.
2295+
2296+
What: /sys/bus/iio/devices/iio:deviceX/filter_type
2297+
What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_type
2298+
KernelVersion: 6.1
2299+
Contact: linux-iio@vger.kernel.org
2300+
Description:
2301+
Specifies which filter type apply to the channel. The possible
2302+
values are given by the filter_type_available attribute.
22932303

22942304
What: /sys/.../events/in_proximity_thresh_either_runningperiod
22952305
KernelVersion: 6.6
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
2+
KernelVersion: 6.2
3+
Contact: linux-iio@vger.kernel.org
4+
Description:
5+
Reading returns a list with the possible filter modes.
6+
7+
This ABI is only kept for backwards compatibility and the values
8+
returned are identical to filter_type_available attribute
9+
documented in Documentation/ABI/testing/sysfs-bus-iio. Please,
10+
use filter_type_available like ABI to provide filter options for
11+
new drivers.
12+
13+
What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_filter_mode
14+
KernelVersion: 6.2
15+
Contact: linux-iio@vger.kernel.org
16+
Description:
17+
This ABI is only kept for backwards compatibility and the values
18+
returned are identical to in_voltageY-voltageZ_filter_type
19+
attribute documented in Documentation/ABI/testing/sysfs-bus-iio.
20+
Please, use in_voltageY-voltageZ_filter_type for new drivers.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2024 Analog Devices Inc.
3+
# Copyright 2024 BayLibre, SAS.
4+
%YAML 1.2
5+
---
6+
$id: http://devicetree.org/schemas/iio/adc/adi,ad4030.yaml#
7+
$schema: http://devicetree.org/meta-schemas/core.yaml#
8+
9+
title: Analog Devices AD4030 and AD4630 ADC families
10+
11+
maintainers:
12+
- Michael Hennerich <michael.hennerich@analog.com>
13+
- Nuno Sa <nuno.sa@analog.com>
14+
15+
description: |
16+
Analog Devices AD4030 single channel and AD4630/AD4632 dual channel precision
17+
SAR ADC families
18+
19+
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4030-24-4032-24.pdf
20+
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4630-24_ad4632-24.pdf
21+
* https://www.analog.com/media/en/technical-documentation/data-sheets/ad4630-16-4632-16.pdf
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- adi,ad4030-24
27+
- adi,ad4032-24
28+
- adi,ad4630-16
29+
- adi,ad4630-24
30+
- adi,ad4632-16
31+
- adi,ad4632-24
32+
33+
reg:
34+
maxItems: 1
35+
36+
spi-max-frequency:
37+
maximum: 102040816
38+
39+
spi-rx-bus-width:
40+
enum: [1, 2, 4]
41+
42+
vdd-5v-supply: true
43+
vdd-1v8-supply: true
44+
vio-supply: true
45+
46+
ref-supply:
47+
description:
48+
Optional External unbuffered reference. Used when refin-supply is not
49+
connected.
50+
51+
refin-supply:
52+
description:
53+
Internal buffered Reference. Used when ref-supply is not connected.
54+
55+
cnv-gpios:
56+
description:
57+
The Convert Input (CNV). It initiates the sampling conversions.
58+
maxItems: 1
59+
60+
reset-gpios:
61+
description:
62+
The Reset Input (/RST). Used for asynchronous device reset.
63+
maxItems: 1
64+
65+
interrupts:
66+
description:
67+
The BUSY pin is used to signal that the conversions results are available
68+
to be transferred when in SPI Clocking Mode. This nodes should be
69+
connected to an interrupt that is triggered when the BUSY line goes low.
70+
maxItems: 1
71+
72+
interrupt-names:
73+
const: busy
74+
75+
required:
76+
- compatible
77+
- reg
78+
- vdd-5v-supply
79+
- vdd-1v8-supply
80+
- vio-supply
81+
- cnv-gpios
82+
83+
oneOf:
84+
- required:
85+
- ref-supply
86+
- required:
87+
- refin-supply
88+
89+
unevaluatedProperties: false
90+
91+
examples:
92+
- |
93+
#include <dt-bindings/gpio/gpio.h>
94+
95+
spi {
96+
#address-cells = <1>;
97+
#size-cells = <0>;
98+
99+
adc@0 {
100+
compatible = "adi,ad4030-24";
101+
reg = <0>;
102+
spi-max-frequency = <80000000>;
103+
vdd-5v-supply = <&supply_5V>;
104+
vdd-1v8-supply = <&supply_1_8V>;
105+
vio-supply = <&supply_1_8V>;
106+
ref-supply = <&supply_5V>;
107+
cnv-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
108+
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
109+
};
110+
};

Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ properties:
8484
description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW.
8585
maxItems: 1
8686

87+
pwms:
88+
description: PWM signal connected to the CNV pin.
89+
maxItems: 1
90+
8791
interrupts:
8892
minItems: 1
8993
items:
@@ -106,6 +110,15 @@ properties:
106110
The first cell is the GPn number: 0 to 3.
107111
The second cell takes standard GPIO flags.
108112
113+
'#trigger-source-cells':
114+
description: |
115+
First cell indicates the output signal: 0 = BUSY, 1 = ALERT.
116+
Second cell indicates which GPn pin is used: 0, 2 or 3.
117+
118+
For convenience, macros for these values are available in
119+
dt-bindings/iio/adc/adi,ad4695.h.
120+
const: 2
121+
109122
"#address-cells":
110123
const: 1
111124

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2024 Analog Devices Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/iio/adc/adi,ad4851.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Analog Devices AD485X family
9+
10+
maintainers:
11+
- Sergiu Cuciurean <sergiu.cuciurean@analog.com>
12+
- Dragos Bogdan <dragos.bogdan@analog.com>
13+
- Antoniu Miclaus <antoniu.miclaus@analog.com>
14+
15+
description: |
16+
Analog Devices AD485X fully buffered, 8-channel simultaneous sampling,
17+
16/20-bit, 1 MSPS data acquisition system (DAS) with differential, wide
18+
common-mode range inputs.
19+
20+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4855.pdf
21+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4856.pdf
22+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4857.pdf
23+
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4858.pdf
24+
25+
$ref: /schemas/spi/spi-peripheral-props.yaml#
26+
27+
properties:
28+
compatible:
29+
enum:
30+
- adi,ad4851
31+
- adi,ad4852
32+
- adi,ad4853
33+
- adi,ad4854
34+
- adi,ad4855
35+
- adi,ad4856
36+
- adi,ad4857
37+
- adi,ad4858
38+
- adi,ad4858i
39+
40+
reg:
41+
maxItems: 1
42+
43+
vcc-supply: true
44+
45+
vee-supply: true
46+
47+
vdd-supply: true
48+
49+
vddh-supply: true
50+
51+
vddl-supply: true
52+
53+
vio-supply: true
54+
55+
vrefbuf-supply: true
56+
57+
vrefio-supply: true
58+
59+
pwms:
60+
description: PWM connected to the CNV pin.
61+
maxItems: 1
62+
63+
io-backends:
64+
maxItems: 1
65+
66+
pd-gpios:
67+
maxItems: 1
68+
69+
spi-max-frequency:
70+
maximum: 25000000
71+
72+
'#address-cells':
73+
const: 1
74+
75+
'#size-cells':
76+
const: 0
77+
78+
patternProperties:
79+
"^channel(@[0-7])?$":
80+
$ref: adc.yaml
81+
type: object
82+
description: Represents the channels which are connected to the ADC.
83+
84+
properties:
85+
reg:
86+
description:
87+
The channel number, as specified in the datasheet (from 0 to 7).
88+
minimum: 0
89+
maximum: 7
90+
91+
diff-channels:
92+
description:
93+
Each channel can be configured as a bipolar differential channel.
94+
The ADC uses the same positive and negative inputs for this.
95+
This property must be specified as 'reg' (or the channel number) for
96+
both positive and negative inputs (i.e. diff-channels = <reg reg>).
97+
Since the configuration is bipolar differential, the 'bipolar'
98+
property is required.
99+
items:
100+
minimum: 0
101+
maximum: 7
102+
103+
bipolar: true
104+
105+
required:
106+
- reg
107+
108+
additionalProperties: false
109+
110+
required:
111+
- compatible
112+
- reg
113+
- vcc-supply
114+
- vee-supply
115+
- vdd-supply
116+
- vio-supply
117+
- pwms
118+
119+
unevaluatedProperties: false
120+
121+
examples:
122+
- |
123+
spi {
124+
#address-cells = <1>;
125+
#size-cells = <0>;
126+
127+
adc@0{
128+
#address-cells = <1>;
129+
#size-cells = <0>;
130+
compatible = "adi,ad4858";
131+
reg = <0>;
132+
spi-max-frequency = <10000000>;
133+
vcc-supply = <&vcc>;
134+
vdd-supply = <&vdd>;
135+
vee-supply = <&vee>;
136+
vddh-supply = <&vddh>;
137+
vddl-supply = <&vddl>;
138+
vio-supply = <&vio>;
139+
pwms = <&pwm_gen 0 0>;
140+
io-backends = <&iio_backend>;
141+
142+
channel@0 {
143+
reg = <0>;
144+
diff-channels = <0 0>;
145+
bipolar;
146+
};
147+
148+
channel@1 {
149+
reg = <1>;
150+
};
151+
};
152+
};
153+
...

0 commit comments

Comments
 (0)