Skip to content

Commit 4e1d963

Browse files
committed
Merge tag 'iio-for-5.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: First set of new IIO device support, features and cleanup for the 5.8 cycle Usual mix of new drivers, new support in old drivers and lots of minor cleanup. Yaml conversions also continue to trickle in (plenty more to go!) New device support * ad7476 - Add ad7091 support (ID only) * ad9467 - New driver for this 200/250 MSPS adi-axi-adc and SPI attached ADC. * adi-axi-adc - New driver to support ADIs generic AXI ADC IP core, used to provide high speed interfaces to ADCs (JESD204B/C or parallel interfaces). Usually paired with a device using a slow configuration interface (spi etc) Includes DT bindings and some fixes for fpga headers. * bmg160 - Add support for BMI088 (ID only) * max1241 - New driver for this ADC. * st_sensors - Add support for LIS2HH12 accelerometer * sx9310 - New driver supporting sx9310 and sx9311 proximity sensors. Yaml DT binding conversions * rockchip-saradc (including adding some missing parts) * stm32-dac * tsl2563 * vcnl4000 Features * st_lsm6dsx - Add LIS3MDL as a possible sensor hub device. * vcnl4000 - Add new concept of near level (from DT) to provide to userspace which often needs to have some calibrated concept of 'near'. Cleanups, minor fixes etc. * core - Use snprintf for functions where strings are built and there is potential for overflow. - Correct docs to indicate mlock should not be used directly by drivers. - Fix up accidental dropping of a patch to use bitmap_zalloc. - Stop allowing enabling of buffers with no channels enabled. - Drop unused 'stufftoread' from iio_buffer. - Drop scan_el_attrs form iio_buffer as unused. - Reorder sanity checks in __iio_device_register to fail earlier. - Drop all the devm_ runregister / free functions from IIO as they were never used and encourage poor design. * dma-buffer - Tidy up includes. * dma-engine-buffer - Provide dev-managed allocator. - Fix an issue with printing a size_t * cross subsystem (kxsd9, bmg160, mpu3050, bmi160, mpu6050, bmc150) - Replace some unnecessary casts of error ptrs and whilst there. use the %pe printf parameter to print them in a more useful fashion. * cross subsystem - Drop casts in calls to regmap_bulk_read as they make no sense. - Use devm_platform_ioremap_resource to reduce boilerplate. - Fix typos in Analog Devices. * counters/104-quad - Add Syed Nayyar Waris as an additional maintainer. * ad7476 - Generate CONVST signal internally rather than requiring external trigger. Add sysfs read back as can now do so. - use devm_add_action_or_reset to tidy up error and remove handling. * ad7793 - Switch to read_avail from explicit attribute. Mostly done to avoid confusing people with a - sign (without surounding spaces) that was correct but checkpatch didn't like. * adis library - Add missing newlines at end of error messages. * adis16400 - Use DEFINE_DEBUGS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTR. * adis16460 - Use DEFINE_DEBUGS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTR. * ad_sigma_delta - Move some channel definitions into individual drivers to avoid having to deal with complex options. * ak8974 - Silence an error on deffered probe. * bmp280 - Harden against IRQ before registration. - Convert to read_avail instead of opencoding the equivalent. - Explicitly mark GPIO as optional. - Cleanup casts. - Remove line breaks from strings. * htts221 - Replace direct access to platform_data with dev_get_platdata(). - Use device properties rather than device tree ones to allow ACPI probing. - Casting cleanups. * intel_mrfld_adc - Don't use unaligned accessor for aligned data. * isl29125 - Reorder buer pre and post hooks to allow for coming core rework. * ltc2983 - Remove comp to bool. * max1363 - Stop using mlock from the iio_dev directly in favour of a local lock with clearly defined scope. * max30100 - Use generic device properties to allow ACPI probe. * mpu6050 - Convert to i2c_new_client_device. - Add debugfs register access. * st_lsm6dsx - Provide means of configuring full scale on slave device if supported. - Drop include of st_sensors header to get one value. Its not otherwise used by this driver. * st-sensors - Replace direct access to platform_data with dev_get_platdata(). - Casting cleanups. - Avoid splitting strings. * st_uvis25 - Casting cleanups. * tsl2563 - Typo fix. * tsl2772 - scnprintf in a non obvious string building usecase. Note also 'fixes' a wrong calculation of remaining space that couldn't actually cause any trouble as there was lots of room. * xilinx-xadc - Fix Lars-Peter spelling his own name wrong :) + additional typos. * tag 'iio-for-5.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (101 commits) iio: magnetometer: ak8974: Silence deferred-probe error Documentation: ABI: document IIO in_proximity_nearlevel file iio: vcnl4000: Export near level property for proximity sensor dt-bindings: iio: light: vcnl4000: Add proximity-near-level dt-bindings: iio: Introduce common properties for iio sensors dt-bindings: iio: vcnl4000: convert bindings to YAML format iio: Fix misspellings of "Analog Devices" iio: light: isl29125: fix iio_triggered_buffer_{predisable,postenable} positions iio: adc: fsl-imx25-gcq: Use devm_platform_ioremap_resource iio: adc: at91-adc: Use devm_platform_ioremap_resource iio: adc: sun4i-gpadc-iio: Use devm_platform_ioremap_resource iio:light:ltr501: Drop unnecessary cast of parameter in regmap_bulk_read iio:magn:mmc35240: Drop unnecessary casts of val parameter in regmap_bulk* iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. iio:chemical:bme680: Tidy up parameters to regmap_bulk_read iio:chemical:atlas-sensor: Drop unnecessary explicit casts in regmap_bulk_read calls iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read calls iio: imu: st_lsm6dsx: drop huge include in sensor-hub driver iio: buffer: drop devm_iio_kfifo_free() API call iio: buffer: drop devm_iio_hw_consumer_free() API call ...
2 parents 710c451 + 2de8c02 commit 4e1d963

110 files changed

Lines changed: 3625 additions & 774 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.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/in_proximity_nearlevel
2+
Date: March 2020
3+
KernelVersion: 5.7
4+
Contact: linux-iio@vger.kernel.org
5+
Description:
6+
Near level for proximity sensors. This is a single integer
7+
value that tells user space when an object should be
8+
considered close to the device. If the value read from the
9+
sensor is above or equal to the value in this file an object
10+
should typically be considered near.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/in_proximity3_comb_raw
2+
Date: February 2019
3+
KernelVersion: 5.6
4+
Contact: Daniel Campello <campello@chromium.org>
5+
Description:
6+
Proximity measurement indicating that some object is
7+
near the combined sensor. The combined sensor presents
8+
proximity measurements constructed by hardware by
9+
combining measurements taken from a given set of
10+
physical sensors.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/adc/adi,ad9467.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices AD9467 High-Speed ADC
8+
9+
maintainers:
10+
- Michael Hennerich <michael.hennerich@analog.com>
11+
- Alexandru Ardelean <alexandru.ardelean@analog.com>
12+
13+
description: |
14+
The AD9467 is a 16-bit, monolithic, IF sampling analog-to-digital
15+
converter (ADC).
16+
17+
https://www.analog.com/media/en/technical-documentation/data-sheets/AD9467.pdf
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- adi,ad9467
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
clock-names:
31+
items:
32+
- const: adc-clk
33+
34+
powerdown-gpios:
35+
description:
36+
Pin that controls the powerdown mode of the device.
37+
maxItems: 1
38+
39+
reset-gpios:
40+
description:
41+
Reset pin for the device.
42+
maxItems: 1
43+
44+
required:
45+
- compatible
46+
- reg
47+
- clocks
48+
- clock-names
49+
50+
additionalProperties: false
51+
52+
examples:
53+
- |
54+
spi {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
adc@0 {
59+
compatible = "adi,ad9467";
60+
reg = <0>;
61+
clocks = <&adc_clk>;
62+
clock-names = "adc-clk";
63+
};
64+
};
65+
...
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/adc/adi,axi-adc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices AXI ADC IP core
8+
9+
maintainers:
10+
- Michael Hennerich <michael.hennerich@analog.com>
11+
- Alexandru Ardelean <alexandru.ardelean@analog.com>
12+
13+
description: |
14+
Analog Devices Generic AXI ADC IP core for interfacing an ADC device
15+
with a high speed serial (JESD204B/C) or source synchronous parallel
16+
interface (LVDS/CMOS).
17+
Usually, some other interface type (i.e SPI) is used as a control
18+
interface for the actual ADC, while this IP core will interface
19+
to the data-lines of the ADC and handle the streaming of data into
20+
memory via DMA.
21+
22+
https://wiki.analog.com/resources/fpga/docs/axi_adc_ip
23+
24+
properties:
25+
compatible:
26+
enum:
27+
- adi,axi-adc-10.0.a
28+
29+
reg:
30+
maxItems: 1
31+
32+
dmas:
33+
maxItems: 1
34+
35+
dma-names:
36+
items:
37+
- const: rx
38+
39+
adi,adc-dev:
40+
$ref: /schemas/types.yaml#/definitions/phandle
41+
description:
42+
A reference to a the actual ADC to which this FPGA ADC interfaces to.
43+
44+
required:
45+
- compatible
46+
- dmas
47+
- reg
48+
- adi,adc-dev
49+
50+
additionalProperties: false
51+
52+
examples:
53+
- |
54+
axi-adc@44a00000 {
55+
compatible = "adi,axi-adc-10.0.a";
56+
reg = <0x44a00000 0x10000>;
57+
dmas = <&rx_dma 0>;
58+
dma-names = "rx";
59+
60+
adi,adc-dev = <&spi_adc>;
61+
};
62+
...
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
# Copyright 2020 Alexandru Lazar
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/iio/adc/maxim,max1241.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Maxim MAX1241 12-bit, single-channel analog to digital converter
9+
10+
maintainers:
11+
- Alexandru Lazar <alazar@startmail.com>
12+
13+
description: |
14+
Bindings for the max1241 12-bit, single-channel ADC device. Datasheet
15+
can be found at:
16+
https://datasheets.maximintegrated.com/en/ds/MAX1240-MAX1241.pdf
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- maxim,max1241
22+
23+
reg:
24+
maxItems: 1
25+
26+
vdd-supply:
27+
description:
28+
Device tree identifier of the regulator that powers the ADC.
29+
30+
vref-supply:
31+
description:
32+
Device tree identifier of the regulator that provides the external
33+
reference voltage.
34+
35+
shutdown-gpios:
36+
description:
37+
GPIO spec for the GPIO pin connected to the ADC's /SHDN pin. If
38+
specified, the /SHDN pin will be asserted between conversions,
39+
thus enabling power-down mode.
40+
maxItems: 1
41+
42+
required:
43+
- compatible
44+
- reg
45+
- vdd-supply
46+
- vref-supply
47+
48+
examples:
49+
- |
50+
#include <dt-bindings/gpio/gpio.h>
51+
spi {
52+
#address-cells = <1>;
53+
#size-cells = <0>;
54+
55+
adc@0 {
56+
compatible = "maxim,max1241";
57+
reg = <0>;
58+
vdd-supply = <&adc_vdd>;
59+
vref-supply = <&adc_vref>;
60+
spi-max-frequency = <1000000>;
61+
shutdown-gpios = <&gpio 26 1>;
62+
};
63+
};

‎Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt‎

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/adc/rockchip-saradc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip Successive Approximation Register (SAR) A/D Converter
8+
9+
maintainers:
10+
- Heiko Stuebner <heiko@sntech.de>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- const: rockchip,saradc
16+
- const: rockchip,rk3066-tsadc
17+
- const: rockchip,rk3399-saradc
18+
- items:
19+
- enum:
20+
- rockchip,px30-saradc
21+
- rockchip,rk3308-saradc
22+
- rockchip,rk3328-saradc
23+
- rockchip,rv1108-saradc
24+
- const: rockchip,rk3399-saradc
25+
26+
reg:
27+
maxItems: 1
28+
29+
interrupts:
30+
maxItems: 1
31+
32+
clocks:
33+
items:
34+
- description: converter clock
35+
- description: peripheral clock
36+
37+
clock-names:
38+
items:
39+
- const: saradc
40+
- const: apb_pclk
41+
42+
resets:
43+
maxItems: 1
44+
45+
reset-names:
46+
const: saradc-apb
47+
48+
vref-supply:
49+
description:
50+
The regulator supply for the ADC reference voltage.
51+
52+
"#io-channel-cells":
53+
const: 1
54+
55+
required:
56+
- compatible
57+
- reg
58+
- interrupts
59+
- clocks
60+
- clock-names
61+
- vref-supply
62+
- "#io-channel-cells"
63+
64+
additionalProperties: false
65+
66+
examples:
67+
- |
68+
#include <dt-bindings/clock/rk3288-cru.h>
69+
#include <dt-bindings/interrupt-controller/arm-gic.h>
70+
saradc: saradc@2006c000 {
71+
compatible = "rockchip,saradc";
72+
reg = <0x2006c000 0x100>;
73+
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
74+
clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
75+
clock-names = "saradc", "apb_pclk";
76+
resets = <&cru SRST_SARADC>;
77+
reset-names = "saradc-apb";
78+
vref-supply = <&vcc18>;
79+
#io-channel-cells = <1>;
80+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common properties for iio sensors
8+
9+
maintainers:
10+
- Jonathan Cameron <jic23@kernel.org>
11+
- Guido Günther <agx@sigxcpu.org>
12+
13+
description: |
14+
This document defines device tree properties common to several iio
15+
sensors. It doesn't constitue a device tree binding specification by itself but
16+
is meant to be referenced by device tree bindings.
17+
18+
When referenced from sensor tree bindings the properties defined in this
19+
document are defined as follows. The sensor tree bindings are responsible for
20+
defining whether each property is required or optional.
21+
22+
properties:
23+
proximity-near-level:
24+
$ref: /schemas/types.yaml#/definitions/uint32
25+
description: |
26+
For proximity sensors whether an object can be considered near to the
27+
device depends on parameters like sensor position, covering glass and
28+
aperture. This value gives an indication to userspace for which
29+
sensor readings this is the case.
30+
31+
Raw proximity values equal or above this level should be
32+
considered 'near' to the device (an object is near to the
33+
sensor).
34+
35+
...

0 commit comments

Comments
 (0)