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

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

Merge tag 'iio-for-4.8c' of...

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

Jonathan writes:

Third set of IIO new device support, features and cleanups for the 4.8 cycle.

New core features
- Selection of the clock source for IIO timestamps.  This is done per device
  as it makes little sense to have events in one timebase and data timestamped
  on another.  Biggest reason for this is that we currently use a clock
  source which is non monotonic which can result in 'interesting' data sets.
  (Includes export for get_monotonic_corse64 which Thomas Gleixner didn't mind
   in an earlier version.)
- MAINTAINERS add the git tree to the list for IIO.

New device support + a kind of indirect staging graduation.
* Broadcom iproc-static-adc
  - new driver
* mcp4531
  - support for MCP454x, MCP456x, MCP464x and MCP466x potentiometers
* mpu6050
  - support the IC20608 6 axis motion tracking device
* st-sensors
  - support the lis3l02dq + drop the lis3l02dq driver from staging.
  The general purpose driver is missing event support, but good to get
  rid of this driver which was rather long in the tooth.

New driver features
* ak8975
  - Add vid regulator support and refactor handling in general.
  - Allow a delay after enabling regulators.
  - Runtime and system PM.
* bmg160
  - filter frequency control support.
* bmp280
  - SPI device support.
  - EOC interrupt support for the BMP085
  - power management support.
  - supply regulator support.
  - reset gpio support
  - dt bindings for reset gpio and regulators.
  - of table to support device tree registration
* max1363
  - Device tree bindings.
* mcp4531
  - Device tree bindings.
* st-pressure
  - temperature channels as part of triggered buffer (previously not due
  probably to alignment issues - see below).
  - lps22hb open drain interrupt support.
  - lps22hb temperature channel support

Cleanups and reworkings.
* numerous ADC drivers
  - ensure the iio_dev->dev.of_node is set to the parent dev.of_node so
  as to allow client bindings to find the device.
* ak8975
  - Fix incorrect handling of missing regulator
  - make sure power is down and remove.
* bmp280
  - read the calibration data only once as it doesn't change.
* isl29125
  - Use a few macros to make code a touch more readable.
* mma8452
  - fix a memory leak on error.
  - drop an unecessary bit of return value handling.
* potentiometer kconfig
  - typo fix.
* st-pressure
  - drop some uninformative default assignments of elements of the channel
  array structure (aids readability).
* st-sensors
  - Harden interrupt handling considerably.  These are actually all using
  level interrupts, but at least two known boards have them wired to
  edge only interrupt chips.  Hence a slightly interesting bit of handling
  is needed in which we first allow for the easy option (level triggered) and
  secondly check the status registers before reenabling edge interrupts and
  fall back to a tight loop in the thread until we successfully clear the
  interrupt.  No harm is done if we never succeed in doing so.  It's an odd
  patch that has been through a lot of revisions to reach a consensus on how
  to handle what is basically broken hardware (which the previous defaults
  allowed to kind of work).
  - Fix alignment to defined storagebytes boundaries.
  - Ensure alignment of power of 2 byte boundaries.  This has always in theory
  been part of the ABI of IIO, but we missed a few that snuck in that need
  fixing.  The effect was minor as they were only followed by timestamp
  channels which were correctly aligned,
  - Add some docs to explain the gain calculations.
parents 7813029a 0ddfd857
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -32,6 +32,13 @@ Description:
		Description of the physical chip / device for device X.
		Typically a part number.

What:		/sys/bus/iio/devices/iio:deviceX/timestamp_clock
KernelVersion:	4.5
Contact:	linux-iio@vger.kernel.org
Description:
		String identifying current posix clock used to timestamp
		buffered samples and events for device X.

What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency
What:		/sys/bus/iio/devices/iio:deviceX/buffer/sampling_frequency
What:		/sys/bus/iio/devices/triggerX/sampling_frequency
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@

    irqreturn_t sensor_iio_pollfunc(int irq, void *p)
    {
        pf->timestamp = iio_get_time_ns();
        pf->timestamp = iio_get_time_ns((struct indio_dev *)p);
        return IRQ_WAKE_THREAD;
    }

+64 −0
Original line number Diff line number Diff line
@@ -56,6 +56,70 @@ maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator
maxim,max1237		Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
maxim,max6625		9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
mc,rv3029c2		Real Time Clock Module with I2C-Bus
microchip,mcp4531-502	Microchip 7-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4531-103	Microchip 7-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4531-503	Microchip 7-bit Single I2C Digital Potentiometer (50k)
microchip,mcp4531-104	Microchip 7-bit Single I2C Digital Potentiometer (100k)
microchip,mcp4532-502	Microchip 7-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4532-103	Microchip 7-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4532-503	Microchip 7-bit Single I2C Digital Potentiometer (50k)
microchip,mcp4532-104	Microchip 7-bit Single I2C Digital Potentiometer (100k)
microchip,mcp4541-502	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4541-103	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4541-503	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4541-104	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4542-502	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4542-103	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4542-503	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4542-104	Microchip 7-bit Single I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4551-502	Microchip 8-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4551-103	Microchip 8-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4551-503	Microchip 8-bit Single I2C Digital Potentiometer (50k)
microchip,mcp4551-104	Microchip 8-bit Single I2C Digital Potentiometer (100k)
microchip,mcp4552-502	Microchip 8-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4552-103	Microchip 8-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4552-503	Microchip 8-bit Single I2C Digital Potentiometer (50k)
microchip,mcp4552-104	Microchip 8-bit Single I2C Digital Potentiometer (100k)
microchip,mcp4561-502	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4561-103	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4561-503	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4561-104	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4562-502	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4562-103	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4562-503	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4562-104	Microchip 8-bit Single I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4631-502	Microchip 7-bit Dual I2C Digital Potentiometer (5k)
microchip,mcp4631-103	Microchip 7-bit Dual I2C Digital Potentiometer (10k)
microchip,mcp4631-503	Microchip 7-bit Dual I2C Digital Potentiometer (50k)
microchip,mcp4631-104	Microchip 7-bit Dual I2C Digital Potentiometer (100k)
microchip,mcp4632-502	Microchip 7-bit Dual I2C Digital Potentiometer (5k)
microchip,mcp4632-103	Microchip 7-bit Dual I2C Digital Potentiometer (10k)
microchip,mcp4632-503	Microchip 7-bit Dual I2C Digital Potentiometer (50k)
microchip,mcp4632-104	Microchip 7-bit Dual I2C Digital Potentiometer (100k)
microchip,mcp4641-502	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4641-103	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4641-503	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4641-104	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4642-502	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4642-103	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4642-503	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4642-104	Microchip 7-bit Dual I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4651-502	Microchip 8-bit Dual I2C Digital Potentiometer (5k)
microchip,mcp4651-103	Microchip 8-bit Dual I2C Digital Potentiometer (10k)
microchip,mcp4651-503	Microchip 8-bit Dual I2C Digital Potentiometer (50k)
microchip,mcp4651-104	Microchip 8-bit Dual I2C Digital Potentiometer (100k)
microchip,mcp4652-502	Microchip 8-bit Dual I2C Digital Potentiometer (5k)
microchip,mcp4652-103	Microchip 8-bit Dual I2C Digital Potentiometer (10k)
microchip,mcp4652-503	Microchip 8-bit Dual I2C Digital Potentiometer (50k)
microchip,mcp4652-104	Microchip 8-bit Dual I2C Digital Potentiometer (100k)
microchip,mcp4661-502	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4661-103	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4661-503	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4661-104	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (100k)
microchip,mcp4662-502	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (5k)
microchip,mcp4662-103	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (10k)
microchip,mcp4662-503	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (50k)
microchip,mcp4662-104	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (100k)
national,lm63		Temperature sensor with integrated fan control
national,lm75		I2C TEMP SENSOR
national,lm80		Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
+41 −0
Original line number Diff line number Diff line
* Broadcom's IPROC Static ADC controller

Broadcom iProc ADC controller has 8 channels 10bit ADC.
Allows user to convert analog input voltage values to digital.

Required properties:

- compatible: Must be "brcm,iproc-static-adc"

- adc-syscon: Handler of syscon node defining physical base address of the
  controller and length of memory mapped region.

- #io-channel-cells = <1>; As ADC has multiple outputs
  refer to Documentation/devicetree/bindings/iio/iio-bindings.txt for details.

- io-channel-ranges:
  refer to Documentation/devicetree/bindings/iio/iio-bindings.txt for details.

- clocks: Clock used for this block.

- clock-names: Clock name should be given as tsc_clk.

- interrupts: interrupt line number.

For example:

	ts_adc_syscon: ts_adc_syscon@180a6000 {
		compatible = "brcm,iproc-ts-adc-syscon","syscon";
		reg = <0x180a6000 0xc30>;
	};

	adc: adc@180a6000 {
		compatible = "brcm,iproc-static-adc";
		adc-syscon = <&ts_adc_syscon>;
		#io-channel-cells = <1>;
		io-channel-ranges;
		clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>;
		clock-names = "tsc_clk";
		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
		status = "disabled";
	};
+63 −0
Original line number Diff line number Diff line
* Maxim 1x3x/136x/116xx Analog to Digital Converter (ADC)

The node for this driver must be a child node of a I2C controller, hence
all mandatory properties for your controller must be specified. See directory:

        Documentation/devicetree/bindings/i2c

for more details.

Required properties:
  - compatible: Should be one of
		"maxim,max1361"
		"maxim,max1362"
		"maxim,max1363"
		"maxim,max1364"
		"maxim,max1036"
		"maxim,max1037"
		"maxim,max1038"
		"maxim,max1039"
		"maxim,max1136"
		"maxim,max1137"
		"maxim,max1138"
		"maxim,max1139"
		"maxim,max1236"
		"maxim,max1237"
		"maxim,max1238"
		"maxim,max1239"
		"maxim,max11600"
		"maxim,max11601"
		"maxim,max11602"
		"maxim,max11603"
		"maxim,max11604"
		"maxim,max11605"
		"maxim,max11606"
		"maxim,max11607"
		"maxim,max11608"
		"maxim,max11609"
		"maxim,max11610"
		"maxim,max11611"
		"maxim,max11612"
		"maxim,max11613"
		"maxim,max11614"
		"maxim,max11615"
		"maxim,max11616"
		"maxim,max11617"
		"maxim,max11644"
		"maxim,max11645"
		"maxim,max11646"
		"maxim,max11647"
  - reg: Should contain the ADC I2C address

Optional properties:
  - vcc-supply: phandle to the regulator that provides power to the ADC.
  - vref-supply: phandle to the regulator for ADC reference voltage.
  - interrupts: IRQ line for the ADC. If not used the driver will use
    polling.

Example:
adc: max11644@36 {
	compatible = "maxim,max11644";
	reg = <0x36>;
	vref-supply = <&adc_vref>;
};
Loading