Skip to content

Commit 7528cb0

Browse files
committed
Merge tag 'iio-fixes-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
Jonathan writes: IIO: 1st set of fixes for the 6.12 cycle. Most of this pull request is the result of Javier Carrasco doing a careful audit for missing Kconfig dependencies that luck has meant the random builds have never hit. The rest is the usual mix of old bugs that have surfaced and some fallout from the recent merge window. adi,ad5686 - Fix binding duplication of compatible strings. bosch,bma400 - Fix an uninitialized variable in the event tap handling. bosch,bmi323 - Fix several issues in the register saving and restore on suspend/resume sensiron,spd500 - Fix missing CRC8 dependency ti,op3001 - Fix a missing full-scale range value (values above this point were all reported wrongly) vishay,veml6030 - Fix a segmentation fault due to some type confusion. - Fix wrong ambient light sensor resolution. * tag 'iio-fixes-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (34 commits) iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig iio: frequency: {admv4420,adrf6780}: format Kconfig entries iio: adc: ad4695: Add missing Kconfig select iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() iioc: dac: ltc2664: Fix span variable usage in ltc2664_channel_config() iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig iio: frequency: adf4377: add missing select REMAP_SPI in Kconfig iio: resolver: ad2s1210: add missing select (TRIGGERED_)BUFFER in Kconfig iio: resolver: ad2s1210 add missing select REGMAP in Kconfig iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: pressure: bm1390: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: magnetometer: af8133j: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: chemical: ens160: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: dac: ad5766: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig iio: dac: ad3552r: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig ...
2 parents 8cf0b93 + 6b8e9db commit 7528cb0

File tree

19 files changed

+102
-78
lines changed

19 files changed

+102
-78
lines changed

Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,30 @@
44
$id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Analog Devices AD5360 and similar DACs
7+
title: Analog Devices AD5360 and similar SPI DACs
88

99
maintainers:
1010
- Michael Hennerich <michael.hennerich@analog.com>
1111
- Jonathan Cameron <jic23@kernel.org>
1212

1313
properties:
1414
compatible:
15-
oneOf:
16-
- description: SPI devices
17-
enum:
18-
- adi,ad5310r
19-
- adi,ad5672r
20-
- adi,ad5674r
21-
- adi,ad5676
22-
- adi,ad5676r
23-
- adi,ad5679r
24-
- adi,ad5681r
25-
- adi,ad5682r
26-
- adi,ad5683
27-
- adi,ad5683r
28-
- adi,ad5684
29-
- adi,ad5684r
30-
- adi,ad5685r
31-
- adi,ad5686
32-
- adi,ad5686r
33-
- description: I2C devices
34-
enum:
35-
- adi,ad5311r
36-
- adi,ad5337r
37-
- adi,ad5338r
38-
- adi,ad5671r
39-
- adi,ad5675r
40-
- adi,ad5691r
41-
- adi,ad5692r
42-
- adi,ad5693
43-
- adi,ad5693r
44-
- adi,ad5694
45-
- adi,ad5694r
46-
- adi,ad5695r
47-
- adi,ad5696
48-
- adi,ad5696r
49-
15+
enum:
16+
- adi,ad5310r
17+
- adi,ad5672r
18+
- adi,ad5674r
19+
- adi,ad5676
20+
- adi,ad5676r
21+
- adi,ad5679r
22+
- adi,ad5681r
23+
- adi,ad5682r
24+
- adi,ad5683
25+
- adi,ad5683r
26+
- adi,ad5684
27+
- adi,ad5684r
28+
- adi,ad5685r
29+
- adi,ad5686
30+
- adi,ad5686r
5031

5132
reg:
5233
maxItems: 1

Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$id: http://devicetree.org/schemas/iio/dac/adi,ad5696.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Analog Devices AD5696 and similar multi-channel DACs
7+
title: Analog Devices AD5696 and similar I2C multi-channel DACs
88

99
maintainers:
1010
- Michael Auchter <michael.auchter@ni.com>
@@ -16,6 +16,7 @@ properties:
1616
compatible:
1717
enum:
1818
- adi,ad5311r
19+
- adi,ad5337r
1920
- adi,ad5338r
2021
- adi,ad5671r
2122
- adi,ad5675r

drivers/iio/accel/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ config IIO_ST_ACCEL_SPI_3AXIS
447447

448448
config IIO_KX022A
449449
tristate
450+
select IIO_BUFFER
451+
select IIO_TRIGGERED_BUFFER
450452

451453
config IIO_KX022A_SPI
452454
tristate "Kionix KX022A tri-axis digital accelerometer SPI interface"

drivers/iio/accel/bma400_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,8 @@ static int bma400_activity_event_en(struct bma400_data *data,
12181218
static int bma400_tap_event_en(struct bma400_data *data,
12191219
enum iio_event_direction dir, int state)
12201220
{
1221-
unsigned int mask, field_value;
1221+
unsigned int mask;
1222+
unsigned int field_value = 0;
12221223
int ret;
12231224

12241225
/*

drivers/iio/adc/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ config AD4695
5252
tristate "Analog Device AD4695 ADC Driver"
5353
depends on SPI
5454
select REGMAP_SPI
55+
select IIO_BUFFER
56+
select IIO_TRIGGERED_BUFFER
5557
help
5658
Say yes here to build support for Analog Devices AD4695 and similar
5759
analog to digital converters (ADC).
@@ -328,6 +330,8 @@ config AD7923
328330
config AD7944
329331
tristate "Analog Devices AD7944 and similar ADCs driver"
330332
depends on SPI
333+
select IIO_BUFFER
334+
select IIO_TRIGGERED_BUFFER
331335
help
332336
Say yes here to build support for Analog Devices
333337
AD7944, AD7985, AD7986 ADCs.
@@ -1481,6 +1485,8 @@ config TI_ADS8344
14811485
config TI_ADS8688
14821486
tristate "Texas Instruments ADS8688"
14831487
depends on SPI
1488+
select IIO_BUFFER
1489+
select IIO_TRIGGERED_BUFFER
14841490
help
14851491
If you say yes here you get support for Texas Instruments ADS8684 and
14861492
and ADS8688 ADC chips
@@ -1491,6 +1497,8 @@ config TI_ADS8688
14911497
config TI_ADS124S08
14921498
tristate "Texas Instruments ADS124S08"
14931499
depends on SPI
1500+
select IIO_BUFFER
1501+
select IIO_TRIGGERED_BUFFER
14941502
help
14951503
If you say yes here you get support for Texas Instruments ADS124S08
14961504
and ADS124S06 ADC chips
@@ -1525,6 +1533,9 @@ config TI_AM335X_ADC
15251533
config TI_LMP92064
15261534
tristate "Texas Instruments LMP92064 ADC driver"
15271535
depends on SPI
1536+
select REGMAP_SPI
1537+
select IIO_BUFFER
1538+
select IIO_TRIGGERED_BUFFER
15281539
help
15291540
Say yes here to build support for the LMP92064 Precision Current and Voltage
15301541
sensor.

drivers/iio/amplifiers/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ config AD8366
2727
config ADA4250
2828
tristate "Analog Devices ADA4250 Instrumentation Amplifier"
2929
depends on SPI
30+
select REGMAP_SPI
3031
help
3132
Say yes here to build support for Analog Devices ADA4250
3233
SPI Amplifier's support. The driver provides direct access via

drivers/iio/chemical/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ config ENS160
8080
tristate "ScioSense ENS160 sensor driver"
8181
depends on (I2C || SPI)
8282
select REGMAP
83+
select IIO_BUFFER
84+
select IIO_TRIGGERED_BUFFER
8385
select ENS160_I2C if I2C
8486
select ENS160_SPI if SPI
8587
help

drivers/iio/common/hid-sensors/hid-sensor-trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static ssize_t _hid_sensor_set_report_latency(struct device *dev,
3232
latency = integer * 1000 + fract / 1000;
3333
ret = hid_sensor_set_report_latency(attrb, latency);
3434
if (ret < 0)
35-
return len;
35+
return ret;
3636

3737
attrb->latency_ms = hid_sensor_get_report_latency(attrb);
3838

drivers/iio/dac/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ menu "Digital to analog converters"
99
config AD3552R
1010
tristate "Analog Devices AD3552R DAC driver"
1111
depends on SPI_MASTER
12+
select IIO_BUFFER
13+
select IIO_TRIGGERED_BUFFER
1214
help
1315
Say yes here to build support for Analog Devices AD3552R
1416
Digital to Analog Converter.
@@ -252,6 +254,8 @@ config AD5764
252254
config AD5766
253255
tristate "Analog Devices AD5766/AD5767 DAC driver"
254256
depends on SPI_MASTER
257+
select IIO_BUFFER
258+
select IIO_TRIGGERED_BUFFER
255259
help
256260
Say yes here to build support for Analog Devices AD5766, AD5767
257261
Digital to Analog Converter.
@@ -262,6 +266,7 @@ config AD5766
262266
config AD5770R
263267
tristate "Analog Devices AD5770R IDAC driver"
264268
depends on SPI_MASTER
269+
select REGMAP_SPI
265270
help
266271
Say yes here to build support for Analog Devices AD5770R Digital to
267272
Analog Converter.
@@ -353,6 +358,7 @@ config LPC18XX_DAC
353358
config LTC1660
354359
tristate "Linear Technology LTC1660/LTC1665 DAC SPI driver"
355360
depends on SPI
361+
select REGMAP_SPI
356362
help
357363
Say yes here to build support for Linear Technology
358364
LTC1660 and LTC1665 Digital to Analog Converters.
@@ -483,6 +489,7 @@ config STM32_DAC
483489

484490
config STM32_DAC_CORE
485491
tristate
492+
select REGMAP_MMIO
486493

487494
config TI_DAC082S085
488495
tristate "Texas Instruments 8/10/12-bit 2/4-channel DAC driver"

drivers/iio/dac/ltc2664.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static int ltc2664_channel_config(struct ltc2664_state *st)
516516
const struct ltc2664_chip_info *chip_info = st->chip_info;
517517
struct device *dev = &st->spi->dev;
518518
u32 reg, tmp[2], mspan;
519-
int ret, span = 0;
519+
int ret;
520520

521521
mspan = LTC2664_MSPAN_SOFTSPAN;
522522
ret = device_property_read_u32(dev, "adi,manual-span-operation-config",
@@ -579,20 +579,21 @@ static int ltc2664_channel_config(struct ltc2664_state *st)
579579
ret = fwnode_property_read_u32_array(child, "output-range-microvolt",
580580
tmp, ARRAY_SIZE(tmp));
581581
if (!ret && mspan == LTC2664_MSPAN_SOFTSPAN) {
582-
chan->span = ltc2664_set_span(st, tmp[0] / 1000,
583-
tmp[1] / 1000, reg);
584-
if (span < 0)
585-
return dev_err_probe(dev, span,
582+
ret = ltc2664_set_span(st, tmp[0] / 1000, tmp[1] / 1000, reg);
583+
if (ret < 0)
584+
return dev_err_probe(dev, ret,
586585
"Failed to set span\n");
586+
chan->span = ret;
587587
}
588588

589589
ret = fwnode_property_read_u32_array(child, "output-range-microamp",
590590
tmp, ARRAY_SIZE(tmp));
591591
if (!ret) {
592-
chan->span = ltc2664_set_span(st, 0, tmp[1] / 1000, reg);
593-
if (span < 0)
594-
return dev_err_probe(dev, span,
592+
ret = ltc2664_set_span(st, 0, tmp[1] / 1000, reg);
593+
if (ret < 0)
594+
return dev_err_probe(dev, ret,
595595
"Failed to set span\n");
596+
chan->span = ret;
596597
}
597598
}
598599

0 commit comments

Comments
 (0)