Skip to content

Commit 0ca7cb7

Browse files
committed
Merge tag 'iio-for-6.16a-take2' 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 6.16 - take 2 Note - last minute rebase was to drop a typo patch that I'd accidentally picked up (in the microblaze arch Kconfig) Take 2 is due to that rebase messing up some fixes tags that were referring to patches after that point. There is a known merge conflict due to changes in neighbouring lines. Stephen's resolution in linux-next is: https://lore.kernel.org/linux-next/[email protected]/ Added 3 named IIO reviewers to MAINTAINERS. This is a reflection of those who have been doing much of this work for some time. Lars-Peter is removed from the entry having moved on to other topics. Thanks Nuno, David and Andy for stepping up and Lars-Peter for all your hard work in the past! Includes the usual mix of new device support, features and general cleanup. This time we also have some tree wide changes. - Rip out the iio_device_claim_direct_scoped() as it proved hard to work with. This series includes quite a few related cleanups such as use of guard or factoring code out to allow direct returns. - Switch from iio_device_claim/release_direct_mode() to new iio_device_claim/release_direct() which is structured so that sparse can warn on failed releases. There were a few false positives but those were mostly in code that benefited from being cleaned up as part of this process. - Introduce iio_push_to_buffers_with_ts() to replace the _timestamp() version over time. This version takes the size of the supplied buffer which the core checks is at least as big as expected by calculation from channel descriptions of those channels enabled. Use this in an initial set of drivers. - Add macros for IIO_DECLARE_BUFFER_WITH_TS() and IIO_DECLARE_DMA_BUFFER_WITH_TS() to avoid lots of fiddly code to ensure correctly aligned buffers for timestamps being added onto the end of channel data. New device support ------------------ adi,ad3530r - New driver for AD3530, AD3530R, AD3531 and AD3531R DACs with programmable gain controls. R variants have internal references. adi,ad7476 - Add support (dt compatible only) for the Rohm BU79100G ADC which is fully compatible with the ti,ads7866. adi,ad7606 - Support ad7606c-16 and ad7606c-18 devices. Includes switch to dynamic channel information allocation. adi,ad7380 - Add support for the AD7389-4 dfrobot,sen0322 - New driver for this oxygen sensor. mediatek,mt2701-auxadc - Add binding for MT6893 which is fully compatible with already supported MT8173. meson-saradc - Support the GXLX SoCs. Mostly this is a workaround for some unrelated clock control bits found in the ADC register map. nuvoton,nct7201 - New driver for NCT7201 and NCT7202 I2C ADCs. rohm,bd79124 - New driver for this 12-bit, 8-channel SAR ADC. - Switch to new set_rv etc gpio callbacks that were added in 6.15. rohm,bd79703 - Add support for BD79700, BD79701 and BD79702 DACs that have subsets of functionality of the already supported bd79703. Included making this driver suitable for support device variants. st,stm32-lptimer - Add support for stm32pm25 to this trigger. Features -------- Beyond IIO - Property iterator for named children. core - Enable writes for 64 bit integers used for standard IIO ABI elements. Previously these could be read only. - Helper library that should avoid code duplication for simpler ADC bindings that have a child node per channel. - Enforce that IIO_DMA_MINALIGN is always at least 8 (almost always true and simplifies code on all significant architectures) core/backend - Add support to control source of data - useful when the HDL includes things like generated ramps for testing purposes. Enable this for adi-axi-dac adi,ad3552-hs - Add debugfs related callbacks to allow debug access to register contents. adi,ad4000 - Support SPI offload with appropriate FPGA firmware along with improving documentation. adi,ad7293 - Add support for external reference voltage. adi,ad7606 - Support SPI offload. adi,ad7768-1 - Support reset GPIO. adi,admv8818 - Support filter frequencies beyond 2^32. adi,adxl345 - Add single and double tap events. hid-sensor-prox - Support 16-bit report sizes as seen on some Intel platforms. invensense,icm42600 - Enable use of named interrupts to avoid problems with some wiring choices. Get the interrupt by name, but fallback to previous assumption on the first being INT1 if no names are supplied. microchip,mcp3911 - Add reset gpio support. rohm,bh7150 - Add reset gpio support. st,stm32 - Add support to control oversampling. ti,adc128s052 - Add support for ROHM BD79104 which is early compatible with the TI parts already supported by this driver. Includes some general driver cleanup and a separate dt binding. - Simplify reference voltage handling by assuming it is fixed after enabling the supply. winsen,mhz19b - New driver for this C02 sensor. Cleanup and minor fixes ----------------------- dt-bindings - Correct indentation and style for DTS examples. - Use unevalutateProperties for SPI devices instead of additionalProperties to allow generic SPI properties from spi-peripheral-props.yaml ABI Docs - Add missing docs for sampling_frequency when it applies only to events. Treewide - Various minor tweaks, comment fixes and similar. - Sort TI ADCs in Kconfig that had gotten out of order. - Switch various drives that provide GPIO chip functionality to the new callbacks with return values. - Standardize on { } formatting for all array sentinels. - Make use of aligned_s64 in a few places to replace either wrong types or manually defined equivalents. - Drop places where spi bits_per_word is set to 8 because that is the default anyway. adi,ad_sigma_delta library - Avoid a potential use of uninitialized data if reg_size has a value that is not supported (no drivers hit this but it is reasonable hardening) adi,ad4030 - Add error checking for scan types and no longer store it in state. - Rework code to reduce duplication. - Move setting the mode from buffer preenable() to update_scan_mode(), better matching expected semantics of the two different callbacks. - Improve data marshalling comments. adi,ad4695 - Use u16 for buffer elements as oversampling is not yet supported except with SPI offload (which doesn't use this path). adi,ad5592r - Clean up destruction of mutexes. - Use lock guards to simplify code (later patch fixes a missed unlock) adi,ad5933 - Correct some incorrect settling times. adi,ad7091 - Deduplicate handling of writable vs volatile registers as they are the inverse of each other for this device. adi,ad7124 - Fix 3db Filter frequency. - Remove ability to directly write the filter frequency (which was broken) - Register naming improvements. adi,ad7606 - Add a missing return value check. - Fill in max sampling rates for all chips. - Use devm_mutex_init() - Fix up some kernel-doc formatting issues. - Remove some camel case that snuck in. - Drop setting address field in channels as easily established from other fields. - Drop unnecessary parameter to ad76060_scale_setup_cb_t. adi,ad7768-1 - Convert to regmap. - Factor out buffer allocation. - Tidy up headers. adi,ad7944 - Stop setting bits_per_word in SPI xfers with no data. adi,ad9832 - Add of_device_id table rather than just relying on fallbacks. - Use FIELD_PREP() to set values of fields. adi,admv1013 - Cleanup a pointless ternary. adi,admv8818 - Fix up LPF Band 5 frequency which was slightly wrong. - Fix an integer overflow. - Fix range calculation adi,adt7316 - Replace irqd_get_trigger_type(irq_get_irq_data()) with simpler irq_get_trigger_type() adi,adxl345 - Use regmap cache instead of various state variables that were there to reduce bus accesses. - Make regmap return value checking consistent across all call sites. adi,axi-dac - Add a check on number of channels (0 to 15 valid) allwinner,sun20i - Use new adc-helpers to replace local parsing code for channel nodes. bosch,bmp290 - Move to local variables for sensor data marshalling removing the need for a messy definition that has to work for all supported parts. Follow up fix adds a missing initialization. dynaimage,al3010 and dynaimage,al3320a - Various minor cleanup to bring these drivers inline with reviewed feedback given on a new driver. - Fix an error path in which power down is not called when it should be. - Switch to regmap. google,cros_ec - Fix up a flexible array in middle of structure warning. - Flush fifo when changing the timeout to avoid potential long wait for samples. hid-sensor-rotation - Remove an __aligned(16) marking that doesn't seem to be justified. kionix,kxcjk-1013 - Deduplicate code for setting up interrupts. microchip,mcp3911 - Fix handling of conversion results register which differs across supported devices. idt,zopt2201 - Avoid duplicating register lists as all volatile registers are the inverse of writeable registers on this device. renesas,rzg2l - Use new adc-helpers to replace local parsing code for channel nodes. ti,ads1298 - Fix a missing Kconfig dependency. * tag 'iio-for-6.16a-take2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (260 commits) dt-bindings: iio: adc: Add ROHM BD79100G iio: adc: add support for Nuvoton NCT7201 dt-bindings: iio: adc: add NCT7201 ADCs iio: chemical: Add driver for SEN0322 dt-bindings: trivial-devices: Document SEN0322 iio: adc: ad7768-1: reorganize driver headers iio: bmp280: zero-init buffer iio: ssp_sensors: optimalize -> optimize HID: sensor-hub: Fix typo and improve documentation iio: admv1013: replace redundant ternary operator with just len iio: chemical: mhz19b: Fix error code in probe() iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros iio: make IIO_DMA_MINALIGN minimum of 8 bytes iio: pressure: zpa2326_spi: remove bits_per_word = 8 iio: pressure: ms5611_spi: remove bits_per_word = 8 ...
2 parents 16d6937 + 0c86e33 commit 0ca7cb7

File tree

464 files changed

+8480
-3189
lines changed

Some content is hidden

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

464 files changed

+8480
-3189
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Description:
9494
What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency
9595
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency
9696
What: /sys/bus/iio/devices/iio:deviceX/buffer/sampling_frequency
97+
What: /sys/bus/iio/devices/iio:deviceX/events/sampling_frequency
9798
What: /sys/bus/iio/devices/triggerX/sampling_frequency
9899
KernelVersion: 2.6.35
99100
@@ -740,7 +741,9 @@ Description:
740741
1kohm_to_gnd: connected to ground via an 1kOhm resistor,
741742
2.5kohm_to_gnd: connected to ground via a 2.5kOhm resistor,
742743
6kohm_to_gnd: connected to ground via a 6kOhm resistor,
744+
7.7kohm_to_gnd: connected to ground via a 7.7kOhm resistor,
743745
20kohm_to_gnd: connected to ground via a 20kOhm resistor,
746+
32kohm_to_gnd: connected to ground via a 32kOhm resistor,
744747
42kohm_to_gnd: connected to ground via a 42kOhm resistor,
745748
90kohm_to_gnd: connected to ground via a 90kOhm resistor,
746749
100kohm_to_gnd: connected to ground via an 100kOhm resistor,

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ description: |
2525
* https://www.analog.com/en/products/ad7386-4.html
2626
* https://www.analog.com/en/products/ad7387-4.html
2727
* https://www.analog.com/en/products/ad7388-4.html
28+
* https://www.analog.com/en/products/ad7389-4.html
2829
* https://www.analog.com/en/products/adaq4370-4.html
2930
* https://www.analog.com/en/products/adaq4380-4.html
3031
* https://www.analog.com/en/products/adaq4381-4.html
@@ -49,6 +50,7 @@ properties:
4950
- adi,ad7386-4
5051
- adi,ad7387-4
5152
- adi,ad7388-4
53+
- adi,ad7389-4
5254
- adi,adaq4370-4
5355
- adi,adaq4380-4
5456
- adi,adaq4381-4
@@ -213,6 +215,15 @@ allOf:
213215
properties:
214216
refin-supply: false
215217

218+
# adi,ad7389-4 is internal reference only
219+
- if:
220+
properties:
221+
compatible:
222+
const: adi,ad7389-4
223+
then:
224+
properties:
225+
refio-supply: false
226+
216227
# adaq devices need more supplies and using channel to declare gain property
217228
# only applies to adaq devices
218229
- if:

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

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,40 @@ description: |
1717
1818
properties:
1919
compatible:
20-
enum:
21-
- adi,ad7091
22-
- adi,ad7091r
23-
- adi,ad7273
24-
- adi,ad7274
25-
- adi,ad7276
26-
- adi,ad7277
27-
- adi,ad7278
28-
- adi,ad7466
29-
- adi,ad7467
30-
- adi,ad7468
31-
- adi,ad7475
32-
- adi,ad7476
33-
- adi,ad7476a
34-
- adi,ad7477
35-
- adi,ad7477a
36-
- adi,ad7478
37-
- adi,ad7478a
38-
- adi,ad7495
39-
- adi,ad7910
40-
- adi,ad7920
41-
- adi,ad7940
42-
- ti,adc081s
43-
- ti,adc101s
44-
- ti,adc121s
45-
- ti,ads7866
46-
- ti,ads7867
47-
- ti,ads7868
48-
- lltc,ltc2314-14
20+
oneOf:
21+
- items:
22+
- enum:
23+
- adi,ad7091
24+
- adi,ad7091r
25+
- adi,ad7273
26+
- adi,ad7274
27+
- adi,ad7276
28+
- adi,ad7277
29+
- adi,ad7278
30+
- adi,ad7466
31+
- adi,ad7467
32+
- adi,ad7468
33+
- adi,ad7475
34+
- adi,ad7476
35+
- adi,ad7476a
36+
- adi,ad7477
37+
- adi,ad7477a
38+
- adi,ad7478
39+
- adi,ad7478a
40+
- adi,ad7495
41+
- adi,ad7910
42+
- adi,ad7920
43+
- adi,ad7940
44+
- ti,adc081s
45+
- ti,adc101s
46+
- ti,adc121s
47+
- ti,ads7866
48+
- ti,ads7867
49+
- ti,ads7868
50+
- lltc,ltc2314-14
51+
- items:
52+
- const: rohm,bu79100g
53+
- const: ti,ads7866
4954

5055
reg:
5156
maxItems: 1

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ properties:
4545
"#size-cells":
4646
const: 0
4747

48+
'#trigger-source-cells':
49+
description: |
50+
Cell indicates the output signal: 0 = BUSY, 1 = FIRSTDATA.
51+
52+
For convenience, macros for these values are available in
53+
dt-bindings/iio/adc/adi,ad7606.h.
54+
const: 1
55+
4856
# According to the datasheet, "Data is clocked in from SDI on the falling
4957
# edge of SCLK, while data is clocked out on DOUTA on the rising edge of
5058
# SCLK". Also, even if not stated textually in the datasheet, it is made

Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ properties:
2323
- amlogic,meson8m2-saradc
2424
- amlogic,meson-gxbb-saradc
2525
- amlogic,meson-gxl-saradc
26+
- amlogic,meson-gxlx-saradc
2627
- amlogic,meson-gxm-saradc
2728
- amlogic,meson-axg-saradc
2829
- amlogic,meson-g12a-saradc

Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ properties:
3434
- const: mediatek,mt2701-auxadc
3535
- items:
3636
- enum:
37+
- mediatek,mt6893-auxadc
3738
- mediatek,mt8183-auxadc
3839
- mediatek,mt8186-auxadc
3940
- mediatek,mt8188-auxadc

Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ properties:
3232
spi-max-frequency:
3333
maximum: 20000000
3434

35+
reset-gpios:
36+
maxItems: 1
37+
3538
clocks:
3639
description: |
3740
Phandle and clock identifier for external sampling clock.
@@ -71,6 +74,7 @@ unevaluatedProperties: false
7174

7275
examples:
7376
- |
77+
#include <dt-bindings/gpio/gpio.h>
7478
spi {
7579
#address-cells = <1>;
7680
#size-cells = <0>;
@@ -80,6 +84,7 @@ examples:
8084
reg = <0>;
8185
interrupt-parent = <&gpio5>;
8286
interrupts = <15 2>;
87+
reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
8388
spi-max-frequency = <20000000>;
8489
microchip,device-addr = <0>;
8590
vref-supply = <&vref_reg>;
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/adc/nuvoton,nct7201.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Nuvoton nct7201 and similar ADCs
8+
9+
maintainers:
10+
- Eason Yang <[email protected]>
11+
12+
description: |
13+
The NCT7201/NCT7202 is a Nuvoton Hardware Monitor IC, contains up to 12
14+
voltage monitoring channels, with SMBus interface, and up to 4 sets SMBus
15+
address selection by ADDR connection. It also provides ALERT# signal for
16+
event notification and reset input RSTIN# to recover it from a fault
17+
condition.
18+
19+
NCT7201 contains 8 voltage monitor inputs (VIN1~VIN8).
20+
NCT7202 contains 12 voltage monitor inputs (VIN1~VIN12).
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- nuvoton,nct7201
26+
- nuvoton,nct7202
27+
28+
reg:
29+
maxItems: 1
30+
31+
vdd-supply:
32+
description:
33+
A 3.3V to supply that powers the chip.
34+
35+
vref-supply:
36+
description:
37+
The regulator supply for the ADC reference voltage.
38+
39+
interrupts:
40+
maxItems: 1
41+
42+
reset-gpios:
43+
maxItems: 1
44+
45+
required:
46+
- compatible
47+
- reg
48+
49+
additionalProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/gpio/gpio.h>
54+
#include <dt-bindings/interrupt-controller/irq.h>
55+
56+
i2c {
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
60+
adc@1d {
61+
compatible = "nuvoton,nct7202";
62+
reg = <0x1d>;
63+
vdd-supply = <&vdd>;
64+
vref-supply = <&vref>;
65+
interrupt-parent = <&gpio3>;
66+
interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
67+
reset-gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
68+
};
69+
};
70+
...
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/adc/rohm,bd79104.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ROHM Semiconductor BD79104 ADC
8+
9+
maintainers:
10+
- Matti Vaittinen <[email protected]>
11+
12+
description: |
13+
12 bit SPI ADC with 8 channels.
14+
15+
properties:
16+
compatible:
17+
const: rohm,bd79104
18+
19+
reg:
20+
maxItems: 1
21+
22+
vdd-supply: true
23+
iovdd-supply: true
24+
25+
# The component data-sheet says the frequency is 20M. I, however, found
26+
# that the ROHM evaluation board BD79104FV-EVK-001 had problems with 20M.
27+
# I have successfully used it with 4M. My _assumption_ is that this is not
28+
# the limitation of the component itself, but a limitation of the EVK.
29+
spi-max-frequency:
30+
maximum: 20000000
31+
32+
"#io-channel-cells":
33+
const: 1
34+
35+
spi-cpha: true
36+
spi-cpol: true
37+
38+
required:
39+
- compatible
40+
- reg
41+
- vdd-supply
42+
- iovdd-supply
43+
- spi-cpha
44+
- spi-cpol
45+
46+
allOf:
47+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
48+
49+
unevaluatedProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/interrupt-controller/irq.h>
54+
spi {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
adc@0 {
59+
compatible = "rohm,bd79104";
60+
reg = <0>;
61+
vdd-supply = <&vdd_supply>;
62+
iovdd-supply = <&iovdd_supply>;
63+
spi-max-frequency = <4000000>;
64+
spi-cpha;
65+
spi-cpol;
66+
#io-channel-cells = <1>;
67+
};
68+
};
69+
...

0 commit comments

Comments
 (0)