Commit f55aaec4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'iio-fixes-for-6.15a' of...

Merge tag 'iio-fixes-for-6.15a' 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.15 cycle.

A mixed bunch of fixes for new and ancient issues found.

multiple driver sets:
- Stop leaking wakeup sources on device unbind.
- Various timestamp alignment fixes that came up as part of work to add
  runtime checks on buffer sizing. Similarly a DMA buffer safety fix.
hid-sensor-prox
- Fix a bad merge conflict resolution that lost some variable assignments.
- Fix handling of scale when multiple channels present.
- Fix wrong application of exponent in offset calculation.
adi,ad7380
- Disable offload before using the SPI bus.
- Fix a wrong shift on the event threshold.
adi,ad7606
- Check there is a sw_mode_config callback before using it as not
  all busses define one.
- Fix missing hold of chip select on in multi word accesses.
adi,ad7861
- Fix wrong logic on storing of mode.
adi,adis16201
- Wrong resolution for inclinometer channel.
adi,adxl367
- Use fresh ODR when setting activity time, not previous value.
bosch,bmi270
- Fix initial sampling frequency configuration which was using the
  wrong register mask.
rockchip,saradc
- Fix clock initialization sequence to get frequency after get + enable,
  not before.
st,lsm6dsx
- Avoid 2 potential infinite loops if we see empty FIFOs
ti,opt3001
- Fix a deadlock that can occur due to concurrent access to a flag.

* tag 'iio-fixes-for-6.15a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (28 commits)
  iio: adis16201: Correct inclinometer channel resolution
  iio: adc: ad7606: fix serial register access
  iio: pressure: mprls0025pa: use aligned_s64 for timestamp
  iio: imu: adis16550: align buffers for timestamp
  staging: iio: adc: ad7816: Correct conditional logic for store mode
  iio: adc: ad7266: Fix potential timestamp alignment issue.
  iio: adc: ad7768-1: Fix insufficient alignment of timestamp.
  iio: adc: dln2: Use aligned_s64 for timestamp
  iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
  iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.
  iio: chemical: pms7003: use aligned_s64 for timestamp
  iio: chemical: sps30: use aligned_s64 for timestamp
  iio: imu: inv_mpu6050: align buffer for timestamp
  iio: imu: st_lsm6dsx: Fix wakeup source leaks on device unbind
  iio: adc: qcom-spmi-iadc: Fix wakeup source leaks on device unbind
  iio: accel: fxls8962af: Fix wakeup source leaks on device unbind
  iio: adc: ad7380: fix event threshold shift
  iio: hid-sensor-prox: Fix incorrect OFFSET calculation
  iio: hid-sensor-prox: support multi-channel SCALE calculation
  iio: hid-sensor-prox: Restore lost scale assignments
  ...
parents b4432656 609bc31e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -211,9 +211,9 @@ static const struct iio_chan_spec adis16201_channels[] = {
			BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
	ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12),
	ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X,
			BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
			BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
	ADIS_INCLI_CHAN(Y, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y,
			BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
			BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
	IIO_CHAN_SOFT_TIMESTAMP(7)
};

+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ struct adxl355_data {
		u8 transf_buf[3];
		struct {
			u8 buf[14];
			s64 ts;
			aligned_s64 ts;
		} buffer;
	} __aligned(IIO_DMA_MINALIGN);
};
+3 −7
Original line number Diff line number Diff line
@@ -601,18 +601,14 @@ static int _adxl367_set_odr(struct adxl367_state *st, enum adxl367_odr odr)
	if (ret)
		return ret;

	st->odr = odr;

	/* Activity timers depend on ODR */
	ret = _adxl367_set_act_time_ms(st, st->act_time_ms);
	if (ret)
		return ret;

	ret = _adxl367_set_inact_time_ms(st, st->inact_time_ms);
	if (ret)
		return ret;

	st->odr = odr;

	return 0;
	return _adxl367_set_inact_time_ms(st, st->inact_time_ms);
}

static int adxl367_set_odr(struct iio_dev *indio_dev, enum adxl367_odr odr)
+5 −2
Original line number Diff line number Diff line
@@ -1226,8 +1226,11 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)
	if (ret)
		return ret;

	if (device_property_read_bool(dev, "wakeup-source"))
		device_init_wakeup(dev, true);
	if (device_property_read_bool(dev, "wakeup-source")) {
		ret = devm_device_init_wakeup(dev);
		if (ret)
			return dev_err_probe(dev, ret, "Failed to init wakeup\n");
	}

	return devm_iio_device_register(dev, indio_dev);
}
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct ad7266_state {
	 */
	struct {
		__be16 sample[2];
		s64 timestamp;
		aligned_s64 timestamp;
	} data __aligned(IIO_DMA_MINALIGN);
};

Loading