Skip to content

Commit 2a852fb

Browse files
committed
Merge tag 'iio-for-5.20b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: 2nd set of IIO new device support, cleanup etc for 5.20 Given the slight delay in the likely start of the merge cycle lets get a few more things in for IIO. A few late breaking fixes also included. Bulk in number of patches is mechanical conversion to new PM macros. New device support * npcm - Add support for NPCM8XX with different resolution and voltage references from previously supported parts. Tree wide * pm_ptr()/pm_sleep_ptr()/DEFINE_[SIMPLE/RUNTIME]_DEV_PM_OPS() conversions - Convert all the low hanging fruit to the new macros. The remaining cases will need more careful consideration. Tidy-up, fixes and minor features. * Documentation - Fix duplicate ABI definitions and a missing blank line to squash all remaining docs build issues in IIO. * core - Make iio_format_avail_range() handle non IIO_VAL_INT cases. * core/trigger - Move the setup of trigger->owner to allocation rather than registration. There doesn't seem to be any advantage in doing this late and a few bugs have occurred because of mis-balanced module reference counting. - coding style fix-ups. * tests - Allow kunit tests to be built as a module. * ad7949 - Fix a reversed error message. * cio-dac - Use structures for register map to improve readability. * cros_ec - Register fifo callback only after the sensor is registered. Closes a theoretical race. * hmc5843 - Duplicate word fix. * isl29028 - Fix mixed devm_ and non devm_ for iio_device_register(). * max1027 - Fix missing unlocks in error paths. * rm3100 - Let core code handle setting INDIO_BUFFER_TRIGGERED. * sca3000 - Fix ordering and buffer size issue. * sx_common - Don't use the IIO device to get device properties when the parent struct device is readily available. - Allow the IIO core to connect up the firmware node. * stx104 - Use structures for register map to improve readability. * vf610-adc - Add compatible entries for imx6ul and imx6sx with fallback to fsl,vf610-adc. * tag 'iio-for-5.20b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (65 commits) dt-bindings: iio: adc: Add compatible for MT8188 iio: light: isl29028: Fix the warning in isl29028_remove() iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes iio: fix iio_format_avail_range() printing for none IIO_VAL_INT iio: adc: max1027: unlock on error path in max1027_read_single_value() iio: proximity: sx9324: add empty line in front of bullet list iio: magnetometer: hmc5843: Remove duplicate 'the' iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: adc: imx8qxp: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc iio: temperature: ltc2983: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() iio: proximity: cros_ec_mkbp: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() ...
2 parents fe5fc98 + 180c6cb commit 2a852fb

71 files changed

Lines changed: 468 additions & 397 deletions

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ Description:
107107
relevant directories. If it affects all of the above
108108
then it is to be found in the base device directory.
109109

110+
The stm32-timer-trigger has the additional characteristic that
111+
a sampling_frequency of 0 is defined to stop sampling.
112+
110113
What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
111114
What: /sys/bus/iio/devices/iio:deviceX/in_intensity_sampling_frequency_available
112115
What: /sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available

Documentation/ABI/testing/sysfs-bus-iio-sx9324

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Contact: Gwendal Grignou <gwendal@chromium.org>
55
Description:
66
SX9324 has 3 inputs, CS0, CS1 and CS2. Hardware layout
77
defines if the input is
8+
89
+ not connected (HZ),
910
+ grounded (GD),
1011
+ connected to an antenna where it can act as a base

Documentation/ABI/testing/sysfs-bus-iio-temperature-max31856

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

Documentation/ABI/testing/sysfs-bus-iio-temperature-max31865

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/fault_ovuv
2+
KernelVersion: 5.1
3+
Contact: linux-iio@vger.kernel.org
4+
Description:
5+
Overvoltage or Undervoltage Input Fault. The internal circuitry
6+
is protected from excessive voltages applied to the thermocouple
7+
cables. The device can also detect if such a condition occurs.
8+
9+
Reading returns '1' if input voltage is negative or greater
10+
than VDD, otherwise '0'.
11+
12+
What: /sys/bus/iio/devices/iio:deviceX/fault_oc
13+
KernelVersion: 5.1
14+
Contact: linux-iio@vger.kernel.org
15+
Description:
16+
Open-circuit fault. The detection of open-circuit faults,
17+
such as those caused by broken thermocouple wires.
18+
Reading returns '1' if fault, '0' otherwise.

Documentation/ABI/testing/sysfs-bus-iio-timer-stm32

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ Description:
9090
Reading returns the current master modes.
9191
Writing set the master mode
9292

93-
What: /sys/bus/iio/devices/triggerX/sampling_frequency
94-
KernelVersion: 4.11
95-
Contact: benjamin.gaignard@st.com
96-
Description:
97-
Reading returns the current sampling frequency.
98-
Writing an value different of 0 set and start sampling.
99-
Writing 0 stop sampling.
100-
10193
What: /sys/bus/iio/devices/iio:deviceX/in_count0_preset
10294
KernelVersion: 4.12
10395
Contact: benjamin.gaignard@st.com

Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ description:
1414

1515
properties:
1616
compatible:
17-
const: fsl,vf610-adc
17+
oneOf:
18+
- items:
19+
- enum:
20+
- fsl,imx6sx-adc
21+
- fsl,imx6ul-adc
22+
- const: fsl,vf610-adc
23+
- items:
24+
- const: fsl,vf610-adc
1825

1926
reg:
2027
maxItems: 1

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ properties:
3535
- enum:
3636
- mediatek,mt8183-auxadc
3737
- mediatek,mt8186-auxadc
38+
- mediatek,mt8188-auxadc
3839
- mediatek,mt8195-auxadc
3940
- mediatek,mt8516-auxadc
4041
- const: mediatek,mt8173-auxadc

Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ maintainers:
1010
- Tomer Maimon <tmaimon77@gmail.com>
1111

1212
description:
13-
The NPCM ADC is a 10-bit converter for eight channel inputs.
13+
The NPCM7XX ADC is a 10-bit converter and NPCM8XX ADC is a 12-bit converter,
14+
both have eight channel inputs.
1415

1516
properties:
1617
compatible:
17-
const: nuvoton,npcm750-adc
18+
enum:
19+
- nuvoton,npcm750-adc
20+
- nuvoton,npcm845-adc
1821

1922
reg:
2023
maxItems: 1

drivers/iio/accel/bma220_spi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,20 +289,20 @@ static int bma220_probe(struct spi_device *spi)
289289
return devm_iio_device_register(&spi->dev, indio_dev);
290290
}
291291

292-
static __maybe_unused int bma220_suspend(struct device *dev)
292+
static int bma220_suspend(struct device *dev)
293293
{
294294
struct spi_device *spi = to_spi_device(dev);
295295

296296
return bma220_power(spi, false);
297297
}
298298

299-
static __maybe_unused int bma220_resume(struct device *dev)
299+
static int bma220_resume(struct device *dev)
300300
{
301301
struct spi_device *spi = to_spi_device(dev);
302302

303303
return bma220_power(spi, true);
304304
}
305-
static SIMPLE_DEV_PM_OPS(bma220_pm_ops, bma220_suspend, bma220_resume);
305+
static DEFINE_SIMPLE_DEV_PM_OPS(bma220_pm_ops, bma220_suspend, bma220_resume);
306306

307307
static const struct spi_device_id bma220_spi_id[] = {
308308
{"bma220", 0},
@@ -318,7 +318,7 @@ MODULE_DEVICE_TABLE(spi, bma220_spi_id);
318318
static struct spi_driver bma220_driver = {
319319
.driver = {
320320
.name = "bma220_spi",
321-
.pm = &bma220_pm_ops,
321+
.pm = pm_sleep_ptr(&bma220_pm_ops),
322322
.acpi_match_table = bma220_acpi_id,
323323
},
324324
.probe = bma220_probe,

0 commit comments

Comments
 (0)