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

Commit dacd53c8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull staging and IIO driver fixes from Greg KH:
 "Here are some IIO and staging driver fixes for 4.5-rc3.

  All of them, except one, are for IIO drivers, and one is for a speakup
  driver fix caused by some earlier patches, to resolve a reported build
  failure"

* tag 'staging-4.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  Staging: speakup: Fix allyesconfig build on mn10300
  iio: dht11: Use boottime
  iio: ade7753: avoid uninitialized data
  iio: pressure: mpl115: fix temperature offset sign
  iio: imu: Fix dependencies for !HAS_IOMEM archs
  staging: iio: Fix dependencies for !HAS_IOMEM archs
  iio: adc: Fix dependencies for !HAS_IOMEM archs
  iio: inkern: fix a NULL dereference on error
  iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
  iio: light: acpi-als: Report data as processed
  iio: dac: mcp4725: set iio name property in sysfs
  iio: add HAS_IOMEM dependency to VF610_ADC
  iio: add IIO_TRIGGER dependency to STK8BA50
  iio: proximity: lidar: correct return value
  iio-light: Use a signed return type for ltr501_match_samp_freq()
parents 5af9c2e1 5982557a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -213,6 +213,7 @@ config STK8312
config STK8BA50
	tristate "Sensortek STK8BA50 3-Axis Accelerometer Driver"
	depends on I2C
	depends on IIO_TRIGGER
	help
	  Say yes here to get support for the Sensortek STK8BA50 3-axis
	  accelerometer.
+3 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ config DA9150_GPADC
config EXYNOS_ADC
	tristate "Exynos ADC driver support"
	depends on ARCH_EXYNOS || ARCH_S3C24XX || ARCH_S3C64XX || (OF && COMPILE_TEST)
	depends on HAS_IOMEM
	help
	  Core support for the ADC block found in the Samsung EXYNOS series
	  of SoCs for drivers such as the touchscreen and hwmon to use to share
@@ -207,6 +208,7 @@ config INA2XX_ADC
config IMX7D_ADC
	tristate "IMX7D ADC driver"
	depends on ARCH_MXC || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Say yes here to build support for IMX7D ADC.

@@ -409,6 +411,7 @@ config TWL6030_GPADC
config VF610_ADC
	tristate "Freescale vf610 ADC driver"
	depends on OF
	depends on HAS_IOMEM
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
+1 −1
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev,
		goto error_kfifo_free;

	indio_dev->setup_ops = setup_ops;
	indio_dev->modes |= INDIO_BUFFER_HARDWARE;
	indio_dev->modes |= INDIO_BUFFER_SOFTWARE;

	return 0;

+1 −0
Original line number Diff line number Diff line
@@ -300,6 +300,7 @@ static int mcp4725_probe(struct i2c_client *client,
	data->client = client;

	indio_dev->dev.parent = &client->dev;
	indio_dev->name = id->name;
	indio_dev->info = &mcp4725_info;
	indio_dev->channels = &mcp4725_channel;
	indio_dev->num_channels = 1;
+4 −4
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int dht11_decode(struct dht11 *dht11, int offset, int timeres)
	if (((hum_int + hum_dec + temp_int + temp_dec) & 0xff) != checksum)
		return -EIO;

	dht11->timestamp = ktime_get_real_ns();
	dht11->timestamp = ktime_get_boot_ns();
	if (hum_int < 20) {  /* DHT22 */
		dht11->temperature = (((temp_int & 0x7f) << 8) + temp_dec) *
					((temp_int & 0x80) ? -100 : 100);
@@ -145,7 +145,7 @@ static irqreturn_t dht11_handle_irq(int irq, void *data)

	/* TODO: Consider making the handler safe for IRQ sharing */
	if (dht11->num_edges < DHT11_EDGES_PER_READ && dht11->num_edges >= 0) {
		dht11->edges[dht11->num_edges].ts = ktime_get_real_ns();
		dht11->edges[dht11->num_edges].ts = ktime_get_boot_ns();
		dht11->edges[dht11->num_edges++].value =
						gpio_get_value(dht11->gpio);

@@ -164,7 +164,7 @@ static int dht11_read_raw(struct iio_dev *iio_dev,
	int ret, timeres;

	mutex_lock(&dht11->lock);
	if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_real_ns()) {
	if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_boot_ns()) {
		timeres = ktime_get_resolution_ns();
		if (DHT11_DATA_BIT_HIGH < 2 * timeres) {
			dev_err(dht11->dev, "timeresolution %dns too low\n",
@@ -279,7 +279,7 @@ static int dht11_probe(struct platform_device *pdev)
		return -EINVAL;
	}

	dht11->timestamp = ktime_get_real_ns() - DHT11_DATA_VALID_TIME - 1;
	dht11->timestamp = ktime_get_boot_ns() - DHT11_DATA_VALID_TIME - 1;
	dht11->num_edges = -1;

	platform_set_drvdata(pdev, iio);
Loading