Commit bf3f401d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging and IIO driver fixes from Greg KH:
 "Here are some small staging and iio driver fixes for 5.5-rc7

  All of them are for some small reported issues. Nothing major, full
  details in the shortlog.

  All have been in linux-next with no reported issues"

* tag 'staging-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: comedi: ni_routes: allow partial routing information
  staging: comedi: ni_routes: fix null dereference in ni_find_route_source()
  iio: light: vcnl4000: Fix scale for vcnl4040
  iio: buffer: align the size of scan bytes to size of the largest element
  iio: chemical: pms7003: fix unmet triggered buffer dependency
  iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID
  iio: adc: ad7124: Fix DT channel configuration
parents c5fd2c5b 9fea3a40
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -494,13 +494,11 @@ static int ad7124_of_parse_channel_config(struct iio_dev *indio_dev,
		st->channel_config[channel].buf_negative =
			of_property_read_bool(child, "adi,buffered-negative");

		*chan = ad7124_channel_template;
		chan->address = channel;
		chan->scan_index = channel;
		chan->channel = ain[0];
		chan->channel2 = ain[1];

		chan++;
		chan[channel] = ad7124_channel_template;
		chan[channel].address = channel;
		chan[channel].scan_index = channel;
		chan[channel].channel = ain[0];
		chan[channel].channel2 = ain[1];
	}

	return 0;
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ config IAQCORE
config PMS7003
	tristate "Plantower PMS7003 particulate matter sensor"
	depends on SERIAL_DEV_BUS
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
	  Say Y here to build support for the Plantower PMS7003 particulate
+2 −1
Original line number Diff line number Diff line
@@ -1301,7 +1301,8 @@ static int st_lsm6dsx_check_whoami(struct st_lsm6dsx_hw *hw, int id,

	for (i = 0; i < ARRAY_SIZE(st_lsm6dsx_sensor_settings); i++) {
		for (j = 0; j < ST_LSM6DSX_MAX_ID; j++) {
			if (id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
			if (st_lsm6dsx_sensor_settings[i].id[j].name &&
			    id == st_lsm6dsx_sensor_settings[i].id[j].hw_id)
				break;
		}
		if (j < ST_LSM6DSX_MAX_ID)
+5 −1
Original line number Diff line number Diff line
@@ -566,7 +566,7 @@ static int iio_compute_scan_bytes(struct iio_dev *indio_dev,
				const unsigned long *mask, bool timestamp)
{
	unsigned bytes = 0;
	int length, i;
	int length, i, largest = 0;

	/* How much space will the demuxed element take? */
	for_each_set_bit(i, mask,
@@ -574,13 +574,17 @@ static int iio_compute_scan_bytes(struct iio_dev *indio_dev,
		length = iio_storage_bytes_for_si(indio_dev, i);
		bytes = ALIGN(bytes, length);
		bytes += length;
		largest = max(largest, length);
	}

	if (timestamp) {
		length = iio_storage_bytes_for_timestamp(indio_dev);
		bytes = ALIGN(bytes, length);
		bytes += length;
		largest = max(largest, length);
	}

	bytes = ALIGN(bytes, largest);
	return bytes;
}

+2 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@ static int vcnl4200_init(struct vcnl4000_data *data)
	if (ret < 0)
		return ret;

	data->al_scale = 24000;
	data->vcnl4200_al.reg = VCNL4200_AL_DATA;
	data->vcnl4200_ps.reg = VCNL4200_PS_DATA;
	switch (id) {
@@ -172,11 +171,13 @@ static int vcnl4200_init(struct vcnl4000_data *data)
		/* show 54ms in total. */
		data->vcnl4200_al.sampling_rate = ktime_set(0, 54000 * 1000);
		data->vcnl4200_ps.sampling_rate = ktime_set(0, 4200 * 1000);
		data->al_scale = 24000;
		break;
	case VCNL4040_PROD_ID:
		/* Integration time is 80ms, add 10ms. */
		data->vcnl4200_al.sampling_rate = ktime_set(0, 100000 * 1000);
		data->vcnl4200_ps.sampling_rate = ktime_set(0, 100000 * 1000);
		data->al_scale = 120000;
		break;
	}
	data->vcnl4200_al.last_measurement = ktime_set(0, 0);
Loading