Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b222e9af authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging and IIO fixes from Greg KH:
 "Here is a bunch of IIO driver fixes, and some smaller staging driver
  fixes, for 5.1-rc6. The IIO fixes were delayed due to my vacation, but
  all resolve a number of reported issues and have been in linux-next
  for a few weeks with no reported issues.

  The other staging driver fixes are all tiny, resolving some reported
  issues in the comedi and most drivers, as well as some erofs fixes.

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

* tag 'staging-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (24 commits)
  staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf
  staging: comedi: ni_usb6501: Fix use of uninitialized mutex
  staging: erofs: fix unexpected out-of-bound data access
  staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf
  staging: comedi: vmk80xx: Fix use of uninitialized semaphore
  staging: most: core: use device description as name
  iio: core: fix a possible circular locking dependency
  iio: ad_sigma_delta: select channel when reading register
  iio: pms7003: select IIO_TRIGGERED_BUFFER
  iio: cros_ec: Fix the maths for gyro scale calculation
  iio: adc: xilinx: prevent touching unclocked h/w on remove
  iio: adc: xilinx: fix potential use-after-free on probe
  iio: adc: xilinx: fix potential use-after-free on remove
  iio: dac: mcp4725: add missing powerdown bits in store eeprom
  io: accel: kxcjk1013: restore the range after resume.
  iio:chemical:bme680: Fix SPI read interface
  iio:chemical:bme680: Fix, report temperature in millidegrees
  iio: chemical: fix missing Kconfig block for sgp30
  iio: adc: at91: disable adc channel interrupt in timeout case
  iio: gyro: mpu3050: fix chip ID reading
  ...
parents f9764dd4 af4b54a2
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1437,6 +1437,8 @@ static int kxcjk1013_resume(struct device *dev)


	mutex_lock(&data->mutex);
	mutex_lock(&data->mutex);
	ret = kxcjk1013_set_mode(data, OPERATION);
	ret = kxcjk1013_set_mode(data, OPERATION);
	if (ret == 0)
		ret = kxcjk1013_set_range(data, data->range);
	mutex_unlock(&data->mutex);
	mutex_unlock(&data->mutex);


	return ret;
	return ret;
+1 −0
Original line number Original line Diff line number Diff line
@@ -121,6 +121,7 @@ static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
	if (sigma_delta->info->has_registers) {
	if (sigma_delta->info->has_registers) {
		data[0] = reg << sigma_delta->info->addr_shift;
		data[0] = reg << sigma_delta->info->addr_shift;
		data[0] |= sigma_delta->info->read_mask;
		data[0] |= sigma_delta->info->read_mask;
		data[0] |= sigma_delta->comm;
		spi_message_add_tail(&t[0], &m);
		spi_message_add_tail(&t[0], &m);
	}
	}
	spi_message_add_tail(&t[1], &m);
	spi_message_add_tail(&t[1], &m);
+17 −11
Original line number Original line Diff line number Diff line
@@ -704,23 +704,29 @@ static int at91_adc_read_raw(struct iio_dev *idev,
		ret = wait_event_interruptible_timeout(st->wq_data_avail,
		ret = wait_event_interruptible_timeout(st->wq_data_avail,
						       st->done,
						       st->done,
						       msecs_to_jiffies(1000));
						       msecs_to_jiffies(1000));
		if (ret == 0)
			ret = -ETIMEDOUT;
		if (ret < 0) {
			mutex_unlock(&st->lock);
			return ret;
		}

		*val = st->last_value;


		/* Disable interrupts, regardless if adc conversion was
		 * successful or not
		 */
		at91_adc_writel(st, AT91_ADC_CHDR,
		at91_adc_writel(st, AT91_ADC_CHDR,
				AT91_ADC_CH(chan->channel));
				AT91_ADC_CH(chan->channel));
		at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel));
		at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel));


		if (ret > 0) {
			/* a valid conversion took place */
			*val = st->last_value;
			st->last_value = 0;
			st->last_value = 0;
			st->done = false;
			st->done = false;
			ret = IIO_VAL_INT;
		} else if (ret == 0) {
			/* conversion timeout */
			dev_err(&idev->dev, "ADC Channel %d timeout.\n",
				chan->channel);
			ret = -ETIMEDOUT;
		}

		mutex_unlock(&st->lock);
		mutex_unlock(&st->lock);
		return IIO_VAL_INT;
		return ret;


	case IIO_CHAN_INFO_SCALE:
	case IIO_CHAN_INFO_SCALE:
		*val = st->vref_mv;
		*val = st->vref_mv;
+2 −1
Original line number Original line Diff line number Diff line
@@ -1292,6 +1292,7 @@ static int xadc_probe(struct platform_device *pdev)


err_free_irq:
err_free_irq:
	free_irq(xadc->irq, indio_dev);
	free_irq(xadc->irq, indio_dev);
	cancel_delayed_work_sync(&xadc->zynq_unmask_work);
err_clk_disable_unprepare:
err_clk_disable_unprepare:
	clk_disable_unprepare(xadc->clk);
	clk_disable_unprepare(xadc->clk);
err_free_samplerate_trigger:
err_free_samplerate_trigger:
@@ -1321,8 +1322,8 @@ static int xadc_remove(struct platform_device *pdev)
		iio_triggered_buffer_cleanup(indio_dev);
		iio_triggered_buffer_cleanup(indio_dev);
	}
	}
	free_irq(xadc->irq, indio_dev);
	free_irq(xadc->irq, indio_dev);
	cancel_delayed_work_sync(&xadc->zynq_unmask_work);
	clk_disable_unprepare(xadc->clk);
	clk_disable_unprepare(xadc->clk);
	cancel_delayed_work(&xadc->zynq_unmask_work);
	kfree(xadc->data);
	kfree(xadc->data);
	kfree(indio_dev->channels);
	kfree(indio_dev->channels);


+14 −0
Original line number Original line Diff line number Diff line
@@ -64,6 +64,7 @@ config IAQCORE
config PMS7003
config PMS7003
	tristate "Plantower PMS7003 particulate matter sensor"
	tristate "Plantower PMS7003 particulate matter sensor"
	depends on SERIAL_DEV_BUS
	depends on SERIAL_DEV_BUS
	select IIO_TRIGGERED_BUFFER
	help
	help
	  Say Y here to build support for the Plantower PMS7003 particulate
	  Say Y here to build support for the Plantower PMS7003 particulate
	  matter sensor.
	  matter sensor.
@@ -71,6 +72,19 @@ config PMS7003
	  To compile this driver as a module, choose M here: the module will
	  To compile this driver as a module, choose M here: the module will
	  be called pms7003.
	  be called pms7003.


config SENSIRION_SGP30
	tristate "Sensirion SGPxx gas sensors"
	depends on I2C
	select CRC8
	help
	  Say Y here to build I2C interface support for the following
	  Sensirion SGP gas sensors:
	    * SGP30 gas sensor
	    * SGPC3 low power gas sensor

	  To compile this driver as module, choose M here: the
	  module will be called sgp30.

config SPS30
config SPS30
	tristate "SPS30 particulate matter sensor"
	tristate "SPS30 particulate matter sensor"
	depends on I2C
	depends on I2C
Loading