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

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

Merge tag 'iio-for-4.20b' of...

Merge tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO new device support features and cleanup for the 4.20 cycle.

One merge commit in here to bring in the SPI_CS_WORD flag patches
that are also going via the SPI tree.

There are a few more fixes than normal for a pull targetting the
next merge window.  These are all long term issues and as we are late
in the cycle, they can wait.

New device support
* ad7606
  - Add support fo the ad7605-4 driver.  This driver is still in staging
    but is heading in the right direction to graduate, motivated partly
    by the requirement for this device support.
* ST VL53L0X ToF ranging sensor
  - New minimal driver. Interrupt support to follow.

New features

* SPI_CS_WORD optimization allows long transfers with the chip select
  toggled every 16bits.   There is a software fallback as well to let
  drivers not care about whether the hardware supports it.

* bh1750
  - Device tree support and bindings.
* ti-ads7950
  - Use the SPI_CS_WORD optmization to save lots of cpu cycles (assuming
    the hardware supports it)

Fixes and cleanups

* ad5064
  - Fix some long incorrect regulator error handling that preventing
    enabling the internal regulator.
* ad7606
  - The ad7606 doesn't actually have a 2.5V range and the values provided
    for scale have always been wrong.  Fix them.
  - Drop some wrong kernel-doc (things that don't exist)
  - Add missing kernel-doc
* at91-adc
  - Fixing missing ack of dataready on sysfs channel reads to avoid spurious
    interrupts.
  - Fix a wrong channel numbers in triggered_buffer_mode
* hmc5843
  - Fix incorrect part number in a comment.
* imx25-gcq
  - Fix a device_node leak in an error path.
* meson-saradc
  - Drop an unused and pointless define.
  - Use of_device_get_match_data instead of opencoding
  - Tidy up how meson_sar_adc_param is accessed.
  - Rework prior to adding some temperature sensor support.

* tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: ad5064: Fix regulator handling
  iio: adc: meson-saradc: use the address attribute from iio_chan_spec
  iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly
  iio: adc: at91: fix wrong channel number in triggered buffer mode
  iio: adc: at91: fix acking DRDY irq on simple conversions
  iio: adc: meson-saradc: simplify access to meson_sar_adc_param
  iio: adc: meson-saradc: use of_device_get_match_data
  iio: adc: meson-saradc: remove #define MESON_SAR_ADC_DELTA_10_TS_C_SHIFT
  iio: light: bh1750: Add device tree support
  dt-bindings: iio: light: bh1750: Add device tree binding documentation
  staging:iio:ad7606: Add support for the ad7605-4
  iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.
  staging:iio:ad7606: update structs with doc annotations
  iio: magnetometer: hmc5843: Fixed a comment error.
  iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
  iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage
  spi: add software implementation for SPI_CS_WORD
  spi: add new SPI_CS_WORD flag
  staging:iio:ad7606: Remove incorrect kernel doc annotations
  staging:iio:ad7606: fix voltage scales
parents e2c3860b 8911a43b
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
ROHM BH1750 - ALS, Ambient light sensor

Required properties:

- compatible: Must be one of:
    "rohm,bh1710"
    "rohm,bh1715"
    "rohm,bh1721"
    "rohm,bh1750"
    "rohm,bh1751"
- reg: the I2C address of the sensor

Example:

light-sensor@23 {
	compatible = "rohm,bh1750";
	reg = <0x23>;
};
+12 −0
Original line number Diff line number Diff line
ST VL53L0X ToF ranging sensor

Required properties:
	- compatible: must be "st,vl53l0x"
	- reg: i2c address where to find the device

Example:

vl53l0x@29 {
	compatible = "st,vl53l0x";
	reg = <0x29>;
};
+7 −0
Original line number Diff line number Diff line
@@ -13772,6 +13772,13 @@ L: linux-i2c@vger.kernel.org
S:	Maintained
F:	drivers/i2c/busses/i2c-stm32*

ST VL53L0X ToF RANGER(I2C) IIO DRIVER
M:	Song Qiang <songqiang1304521@gmail.com>
L:	linux-iio@vger.kernel.org
S:	Maintained
F:	drivers/iio/proximity/vl53l0x-i2c.c
F:	Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt

STABLE BRANCH
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L:	stable@vger.kernel.org
+5 −1
Original line number Diff line number Diff line
@@ -248,12 +248,14 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p)
	struct iio_poll_func *pf = p;
	struct iio_dev *idev = pf->indio_dev;
	struct at91_adc_state *st = iio_priv(idev);
	struct iio_chan_spec const *chan;
	int i, j = 0;

	for (i = 0; i < idev->masklength; i++) {
		if (!test_bit(i, idev->active_scan_mask))
			continue;
		st->buffer[j] = at91_adc_readl(st, AT91_ADC_CHAN(st, i));
		chan = idev->channels + i;
		st->buffer[j] = at91_adc_readl(st, AT91_ADC_CHAN(st, chan->channel));
		j++;
	}

@@ -279,6 +281,8 @@ static void handle_adc_eoc_trigger(int irq, struct iio_dev *idev)
		iio_trigger_poll(idev->trig);
	} else {
		st->last_value = at91_adc_readl(st, AT91_ADC_CHAN(st, st->chnb));
		/* Needed to ACK the DRDY interruption */
		at91_adc_readl(st, AT91_ADC_LCDR);
		st->done = true;
		wake_up_interruptible(&st->wq_data_avail);
	}
+6 −0
Original line number Diff line number Diff line
@@ -209,12 +209,14 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
		ret = of_property_read_u32(child, "reg", &reg);
		if (ret) {
			dev_err(dev, "Failed to get reg property\n");
			of_node_put(child);
			return ret;
		}

		if (reg >= MX25_NUM_CFGS) {
			dev_err(dev,
				"reg value is greater than the number of available configuration registers\n");
			of_node_put(child);
			return -EINVAL;
		}

@@ -228,6 +230,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
			if (IS_ERR(priv->vref[refp])) {
				dev_err(dev, "Error, trying to use external voltage reference without a vref-%s regulator.",
					mx25_gcq_refp_names[refp]);
				of_node_put(child);
				return PTR_ERR(priv->vref[refp]);
			}
			priv->channel_vref_mv[reg] =
@@ -240,6 +243,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
			break;
		default:
			dev_err(dev, "Invalid positive reference %d\n", refp);
			of_node_put(child);
			return -EINVAL;
		}

@@ -254,10 +258,12 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,

		if ((refp & MX25_ADCQ_CFG_REFP_MASK) != refp) {
			dev_err(dev, "Invalid fsl,adc-refp property value\n");
			of_node_put(child);
			return -EINVAL;
		}
		if ((refn & MX25_ADCQ_CFG_REFN_MASK) != refn) {
			dev_err(dev, "Invalid fsl,adc-refn property value\n");
			of_node_put(child);
			return -EINVAL;
		}

Loading