Skip to content

Commit 5de07b8

Browse files
committed
Merge tag 'iio-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: IIO: 2nd set of new device support, features and cleanup for 6.13 Alongside new drivers and device support there are several large cleanups going on across the IIO tree and we see part of some of those in this pull request. Merged char-misc-next at point of 6.12-rc6 merge to avoid a conflict with a fix for the ad7380 merged earlier this cycle. Note that I previously messed this merge up and had to reconstruct it this morning so a coherent pull request was possible. The new stuff is all the same as has been in linux-next for some time with the exception of the kernel-doc related __private ordering fix that went in yesterday. New device support ================== adi,ad7380 - Support for adaq4370-4 and adaq4370 quad channel ADCs. adi,ad7606 - Various cleanups preceeding support of AD7607, AD7608 and AD7609 ADCs. adi,ad7779 - New driver supproting AD7770, AD7771 and AD7779 ADCs. allegro,als31300 - New driver for this 3D Linear Hall Effect sensor. bosch,bmi270 - Add support BMI260 which is similar but requires a different firmware image. bosch,smi240 - New driver for this IMU. ti,opt3001 - Add support opt3002 light sensor which has a wider spectral range than the opt3001. vishay,veml3235 - New driver for this ambient light sensor. Features ======== hid-sensors - Add support Human Proximity Range and Attention detection (requiring a new classification style channel type) adi,ad3552r - Add backend support and related platform driver to support use with an FPGA IP to allow QSPI + DDR bus operation and much higher data aquisition rates. (various rework preceeded this feature) adi,ad7606 - Various cleanup prior to enabling use with an IIO Backend and PWM trigger enabling much higher speed data capture. bosch,bme680 - Support control of preheat current - Support triggered buffer capture - Add SCALE and RAW channels (needed to enable the buffered capture). bosch,bmp280 - Enable sleeping to save power. - Add interrupt support for bmp3xx and bmp5xx devices. Also update bmp085 to new approach. - Enable data ready trigger. bosch,bmi270 - Add triggered buffer support - Add scale and sampling frequency control. vishay,veml6070 - Support integration time via DT binding for an external resistor value. Cleanup and minor fixes ======================= core - Fix a longstanding issue with event codes for differential channels. Note that not all drivers are yet fixed, but macros have been added to avoid potential repeats of this in future. - Tidy up handling in iio_read_acpi_mount matrix. - Mark iio_dev::priv with __private. Later move the marking before the field name to avoid a kernel-doc issue. treewide - Drop some pointless default n entries in Kconfig. - Add an iio_get_acpi_device_name_and_data() handler to replace some commonly repeated code. - simplify use of 'state' in write_event_config() callback as it is effectively a boolean. Once done make it a boolean (lots of drivers were updated to enable this) - some more use of devm_regulator_get_enable_read_voltage( to replace open coded versions. Where this enables it convert all of remove handling to devm based and drop the remove callback. - check returns from devm_mutex_init() accel drivers - Use aligned_s64 instead of s64 __aligned(8) adi,ad5791 - Add some missing GPIOs and power supplies that presumably were always hard wired on previous boards. - Refactor to use chip_info in device id tables. - Convert probe entirely to devm based simplify code and allowing remove() callback to be dropped. adi,ad7192 - Check return from spi_get_device_match_data() adi,ad74413r - Don't keep an unnecessary copy of the gpio after probe. - Use devm_regulator_get_enable_read_voltage() instead of open coding. - Apply cleanup.h approach to reduce complexity. adi,dac8460 - Fix a wrong compaitble ID due to a stray space. - Add an spi_device_id table. bosch,bmc150 - Drop some likely false ACPI IDs. - Drop left over unused ACPI specific code. bosch,bme680 - Add mising regmap.h include. - Reduce excessive sleep on startup. - Drop some cammelcase usage. - Use fsleep - Generalize read functions to allow for reuse. - Use s16 variable to avoid some incorrect casting bosch,bmg150 - Drop some likely false ACPI IDs. bosch,bmi270 - Drop unused FREQUENCY and SCALE attributes that always returned an error (they wil be back impelmented correctly). - Factor out the chip specific data into a structure to enable simple support for additional devices. isil,isl29018 - Drop ACPI_PTR() and CONFIG_ACPI guards as not worth the trouble for very minor saving. invensense,mpu6050 - Use much simpler test for ACPI firmware. kionix,kxcjk-1013 - Drop unnecessary ACPI entry in the i2c_device_id table. - Drop support KX022-1020 to fix a bug that was introduced with that change. Hopefully a fixed version will replace it soon. - Drop CONFIG guards for PM in favor of pm_ptr() and the compiler removing dead code. - Switch from enum to chip_info structure and add ODR times to that structure. - Deduplicate one of those ODR structures - Drop ACPI_PTR() and move ID table out of config guards. - Minor additional cleanup. liteon,ltr401 - Drop some likely false ACPI Ids and add LTER0303 which is know to be in use. microchip,pac1934 - Use much simpler test for ACPI firmware. vishay,veml6070 - Use unsigned int instead of just unsigned. - Use FIELD_PREP to make setting of field value explicit. Various other minor fixes to documentation * tag 'iio-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (153 commits) iio: Move __private marking before struct element priv in struct iio_dev docs: iio: ad7380: add adaq4370-4 and adaq4380-4 iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4 iio: adc: ad7380: use local dev variable to shorten long lines iio: adc: ad7380: fix oversampling formula dt-bindings: iio: adc: ad7380: add adaq4370-4 and adaq4380-4 compatible parts iio: chemical: bme680: Add support for preheat current iio: chemical: bme680: Add triggered buffer support iio: chemical: bme680: Add SCALE and RAW channels iio: chemical: bme680: refactorize set_mode() mode iio: events: make IIO_EVENT_CODE macro private iio: accel: mma9553: use specialized event code macros iio: dummy: use specialized event code macros iio: adc: ad7280a: use IIO_DIFF_EVENT_CODE macro helper iio: events.h: add event identifier macros for differential channel iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver dt-bindings: iio: magnetometer: document the Allegro MicroSystems ALS31300 3-D Linear Hall Effect Sensor dt-bindings: vendor-prefixes: Add Allegro MicroSystems, Inc iio: light: apds9960: remove useless return iio: light: apds9960: convert als_int and pxs_int to bool ...
2 parents 7215ff5 + 20fd138 commit 5de07b8

File tree

163 files changed

+8327
-2221
lines changed

Some content is hidden

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

163 files changed

+8327
-2221
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,30 @@ Description:
22682268
An example format is 16-bytes, 2-digits-per-byte, HEX-string
22692269
representing the sensor unique ID number.
22702270

2271+
What: /sys/bus/iio/devices/iio:deviceX/filter_type_available
2272+
What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_filter_mode_available
2273+
KernelVersion: 6.1
2274+
2275+
Description:
2276+
Reading returns a list with the possible filter modes. Options
2277+
for the attribute:
2278+
2279+
* "sinc3" - The digital sinc3 filter. Moderate 1st
2280+
conversion time. Good noise performance.
2281+
* "sinc4" - Sinc 4. Excellent noise performance. Long
2282+
1st conversion time.
2283+
* "sinc5" - The digital sinc5 filter. Excellent noise
2284+
performance
2285+
* "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
2286+
time.
2287+
* "sinc3+rej60" - Sinc3 + 60Hz rejection.
2288+
* "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
2289+
time.
2290+
* "sinc3+pf1" - Sinc3 + device specific Post Filter 1.
2291+
* "sinc3+pf2" - Sinc3 + device specific Post Filter 2.
2292+
* "sinc3+pf3" - Sinc3 + device specific Post Filter 3.
2293+
* "sinc3+pf4" - Sinc3 + device specific Post Filter 4.
2294+
22712295
What: /sys/.../events/in_proximity_thresh_either_runningperiod
22722296
KernelVersion: 6.6
22732297
@@ -2339,3 +2363,11 @@ KernelVersion: 6.10
23392363
23402364
Description:
23412365
The value of current sense resistor in Ohms.
2366+
2367+
What: /sys/.../iio:deviceX/in_attention_input
2368+
KernelVersion: 6.13
2369+
2370+
Description:
2371+
Value representing the user's attention to the system expressed
2372+
in units as percentage. This usually means if the user is
2373+
looking at the screen or not.

Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130

Lines changed: 0 additions & 46 deletions
This file was deleted.

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

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ 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/adaq4370-4.html
29+
* https://www.analog.com/en/products/adaq4380-4.html
2830
2931
3032
$ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -46,6 +48,8 @@ properties:
4648
- adi,ad7386-4
4749
- adi,ad7387-4
4850
- adi,ad7388-4
51+
- adi,adaq4370-4
52+
- adi,adaq4380-4
4953

5054
reg:
5155
maxItems: 1
@@ -70,6 +74,20 @@ properties:
7074
refin-supply:
7175
description:
7276
A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
77+
For adaq devices, a 5V supply voltage. A 3.3V internal reference is
78+
derived from it. Connect to vs-p-supply for normal operation.
79+
80+
vs-p-supply:
81+
description:
82+
Amplifiers positive supply.
83+
84+
vs-n-supply:
85+
description:
86+
Amplifiers negative supply.
87+
88+
ldo-supply:
89+
description:
90+
LDO supply. Connect to vs-p-supply or a 3.6 to 5.5 V supply.
7391

7492
aina-supply:
7593
description:
@@ -97,12 +115,45 @@ properties:
97115
specify the ALERT interrupt.
98116
maxItems: 1
99117

118+
"#address-cells":
119+
const: 1
120+
121+
"#size-cells":
122+
const: 0
123+
100124
required:
101125
- compatible
102126
- reg
103127
- vcc-supply
104128
- vlogic-supply
105129

130+
patternProperties:
131+
"^channel@[0-3]$":
132+
$ref: adc.yaml
133+
type: object
134+
135+
properties:
136+
reg:
137+
description:
138+
The channel number. From 0 to 3 corresponding to channels A,B,C,D
139+
minimum: 0
140+
maximum: 3
141+
142+
adi,gain-milli:
143+
description:
144+
The hardware gain applied to the ADC input (in milli units).
145+
If not present, default to 1000 (no actual gain applied).
146+
Refer to the typical connection diagrams section of the datasheet for
147+
pin wiring.
148+
$ref: /schemas/types.yaml#/definitions/uint16
149+
enum: [300, 600, 1000, 1600]
150+
default: 1000
151+
152+
required:
153+
- reg
154+
155+
additionalProperties: false
156+
106157
unevaluatedProperties: false
107158

108159
allOf:
@@ -140,13 +191,16 @@ allOf:
140191
aind-supply: false
141192

142193
# ad7380-4 uses refin-supply as external reference.
194+
# adaq devices use internal reference only, derived from refin-supply
143195
# All other chips from ad738x family use refio as optional external reference.
144196
# When refio-supply is omitted, internal reference is used.
145197
- if:
146198
properties:
147199
compatible:
148200
enum:
149201
- adi,ad7380-4
202+
- adi,adaq4370-4
203+
- adi,adaq4380-4
150204
then:
151205
properties:
152206
refio-supply: false
@@ -156,6 +210,27 @@ allOf:
156210
properties:
157211
refin-supply: false
158212

213+
# adaq devices need more supplies and using channel to declare gain property
214+
# only applies to adaq devices
215+
- if:
216+
properties:
217+
compatible:
218+
enum:
219+
- adi,adaq4370-4
220+
- adi,adaq4380-4
221+
then:
222+
required:
223+
- vs-p-supply
224+
- vs-n-supply
225+
- ldo-supply
226+
else:
227+
properties:
228+
vs-p-supply: false
229+
vs-n-supply: false
230+
ldo-supply: false
231+
patternProperties:
232+
"^channel@[0-3]$": false
233+
159234
examples:
160235
- |
161236
#include <dt-bindings/interrupt-controller/irq.h>
@@ -180,3 +255,48 @@ examples:
180255
refio-supply = <&supply_2_5V>;
181256
};
182257
};
258+
259+
- |
260+
#include <dt-bindings/interrupt-controller/irq.h>
261+
262+
spi {
263+
#address-cells = <1>;
264+
#size-cells = <0>;
265+
266+
adc@0 {
267+
compatible = "adi,adaq4380-4";
268+
reg = <0>;
269+
270+
spi-cpol;
271+
spi-cpha;
272+
spi-max-frequency = <80000000>;
273+
274+
interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
275+
interrupt-parent = <&gpio0>;
276+
277+
vcc-supply = <&supply_3_3V>;
278+
vlogic-supply = <&supply_3_3V>;
279+
refin-supply = <&supply_5V>;
280+
vs-p-supply = <&supply_5V>;
281+
vs-n-supply = <&supply_0V>;
282+
ldo-supply = <&supply_5V>;
283+
284+
#address-cells = <1>;
285+
#size-cells = <0>;
286+
287+
channel@0 {
288+
reg = <0>;
289+
adi,gain-milli = /bits/ 16 <300>;
290+
};
291+
292+
channel@2 {
293+
reg = <2>;
294+
adi,gain-milli = /bits/ 16 <600>;
295+
};
296+
297+
channel@3 {
298+
reg = <3>;
299+
adi,gain-milli = /bits/ 16 <1000>;
300+
};
301+
};
302+
};

0 commit comments

Comments
 (0)