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

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

Merge tag 'iio-for-4.10a' of...

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

Jonathan writes:

First round of IIO new device support, features and cleanups for the 4.10 cycle.

Fair number of outreachy related patches in here. Some of these may well
have already been picked up by Greg but git will sort that out for us.

Also some good staging cleanup work from other sources. Thanks Brian and Lars
in particular for this.

New device support
* ACCES 104-quad-8
  - New driver for this 8 channel encoder input board. Lots of new ABI with
    this one.
* AD7766
  - New driver supporting AD7766, AD7766-1, AD7766-2, AD7767, AD7767-1 and
    AD7767-2 24 bit ADCs.
* dmard 10
  - New driver for this 3 axis accelerometer.
* Honeywell ABP pressure sensors.
  - New driver covering 56 parts in this series (too many to list here!)
* HTS221
  - New driver to support this relative humidiy and temperature device.
* LMP91000
  - New driver for this potentiostat (form of chemical sensor). Nice example
    of use of the buffered consumer interfaces and the use of a consumer
    provided trigger.
* MiraMEMS DA311
  - New driver for this 3 axis accelerometer.
* MiraMEMS DA280
  - New driver for this 3 axis accelerometer. Follow up caught up with
  vendor prefixes for these.

Staging graduations
* isl29018 light sensor
  - Fixes and cleanups listed below (thanks for your hard work on this Brian!)
* sca3000
  - Fixes and cleanups listed below.  This was one of the small set of drivers
  that went into staging when IIO was first added.  Turns out it had a few
  bugs and needed to be brought into the modern era!  Not clear if I am
  the only person who actually has one of these still wired to a board.

New features (Core)
 - Add an iio_trigger_validate_own_device helper which relies on the device
   and trigger having the same parent.  Convenient to have this for some
   of the more complex trigger / device interactions. Was hand rolled in
   a few drivers already so good to bring it into the core.
 - Add an iio_read_channel_offset in kernel access helper (similar to
   the existing one for scale).
 - IIO_ATTR_{RO, WO, RW} and IIO_DEVICE_ATTR_{RO, WO, RW} macros.  These
   lead some rather contrived function naming, but there is no denying they
   do reduced boilerplate.  I'm going to resist their introduction in
   drivers 'unless' they form part of a larger set of cleanups.
 - Counter channel type and index type.

New features (Drivers)
* hdc100x
  - Triggered buffer support.
* mcp4725
  - Device tree bindings and support.
  - Voltage reference selection.
* ti-adc0832
  - Triggered buffer support.
* ti-adc161s626
  - Add regulator support allowing _scale and _offset values to be established
  and exported.

New features (Tools)
* iio_generic_buffer
  - -A option to force enable all channels rather than faulting if some are
  already enabled (like -a does).  Followup patches tidied this support up.

Cleanups (Core)
 - Use kmalloc_array in iio_scan_mask_set.
 - Take event_attrs field of iio_info structure constant
 - Staging todo list updates. Most of it was long done.
 - MAINTAINERS had a wrong directory listing.

Cleanups (Drivers)
* Missing i2c trivial devices entries.
* ad5592r
  - Fix an endian type related sparse warnings.
* ad7150
  - Constify the event attribute_group structures.
* ad7152
  - Add some blank lines to improve readability.
  - Sampling frequency control via chan-info element rather than hand rolled
  attributes.
  - add a new lock to avoid use of mlock for non state change related locking.
* ad7280
  - Constify atrribute_group structure (second patch covers the event ones)
* ad7606 (Lars is driving most of the cleanup on this with some additions from
  Eva)
  - Fix improper setting of oversampling pins.  This has been broken a very
  long time in this staging driver, so not going to push this back to stable.
  - Implement oversampling configuration via the chan_info mask element.
  - Remove an unused int_vref_mv field.
  - Remove a reundant name field from ad7606_chip_info.
  - Remove default device configuration from platform_data in favour of
  whatever the power on defaults are.
  - Remove out of band error reporting in the kernel log as not providing
  much information.
  - Fix oversampling ratio by having 1 be the value for no oversampling.
  - Avoid allocating buffer for each data capture.
  - Factor out common code between periodic and one-shot capture.
  - Move set_drvdat into common code.
  - Let the common probe function return int rather than jumping through
  an ERR_PTR.
  - Pass struct device * into common remove to simplify code.
  - Always run trigger handler only once per event (no one can remember why
  it was being possibly done twice).
  - Move over to the GPIO descriptor API to shorten and clarify code.
  - Move the buffer code into the main file as it's not optional and is
  now rather short in this driver.
  - Fix the naming of the supply regulator.
  - Rework regulator handling to handle errors including deferred probing.
  - Tidy up a ptr_err or 0 return.
* ad7746
  - Sampling frequency control via info_mask element rather than hand rolled
* ad7758
  - Sampling frequency control via info_mask element rather than hand rolled
  attributes.
* ad7816
  - Constify the event attribute_group structure.
* adt7316
  - Constify the event attribute group structures.
* ak8974
  - Cleanup some sparse warnings about endian types.
* ak8975
  - Cleanup some sparse warnings about endian types.
* bmi160
  - Spare endian warning cleanups.
* isl29018 (towards staging graduation)
  - Remove unusedvariables and defines.
  - Improve consistency of error handling.
  - Signed / unsigned comparison fixes.
  - Use the IIO_DEVICE_ATTR_{RO, RW} macros
  - Fix a race in in_illuminance_scale_available_show.
  - Cleanup exit points of _read_raw
  - Sanity check if in suspended state during a write_raw call as was already
    done for read_raw.
  - Document device tree bidnings.
  - Document infrared supression controls.
  - Add some newlines to improve readability and drop one that shouldn't be
    there.
  - Fix a poorly named functions name.
  - Fix multiline coment syntax.
  - Tidy up a pair or return statements by unifying them.
  - Rename description in Kconfig for consistency with similar drivers.
* lidar
  - cleanup power management by dropping unnecessary call.
* ltr501
  - Use the claim_direct_mode helpers. Fix a race condition along the way.
* max1027
  - Fix a dubious x | !y sparse warning.
  - Use the new iio_trigger_validate_own_device helper.
* max440000
  - Clean up some sparse warnings about endian types.
* mcp4725
  - Use the regulator framework to establish the reference voltage rather than
    getting it from platform data.
  - Tidy up a comment typo.
  - Fix a wrong PTR_ERR query (wrong regulator).
* mma7660
  - Take a mma7660_nscale static.
* mma8452
  - Use the new iio_trigger_validate_own_device helper.
  - Use claim_direct_mode helpers - fix a race condition along the way.
* mpl3115
  - Use claim_direct_mode helpers - fix a race condition along the way.
* ms65611
  - Tidy up regulator error handling and clean out a static warning in the mix.
* sca3000
  - Avoid a potential unitialized variable if a hardware read returns a value
  that isn't actually supported (mostly warning supression).
  - Fix a use before setting of the indio_dev->buffer pointer. Broken for
  a very long time so not going to rush this into stable.
  - Merge buffer file with core file.  We used to always split these.
  Sometimes it's just not worth the hassle. In this case the device's main
  feature is it's hardware fifos so unlikely anyone would want to run it
  without.
  - Drop the sca3000_register_ring_funcs function as it's a pointless wrapper
  once we have only one file.
  - Fix cleaning of flag + setting of size of scan. Without this you can't
  start the buffer twice and expect sensible (or any) results.  Again,
  broken for a long time so not heading for stable.
  - Drop the custom watershed setting ABI - for now we'll just support one
  value.
  - Move to a hybrid hard / soft buffer design (how we've been doing it
  for similar devices for a while now!)
  - Cleanup some unusued variables.
  - Use a fake channel to support core handling of freefall event registration.
  - Cleanup the register defines.
  - Fix an off by one error in axis due to IIO_NO_MOD taking up the 0 value.
  Been broken since first admission of IIO to the staging tree.
  - Add readback of the 3db low pass filter frequency and later writing
    allowing droppign of custom measurement mode attributes as they can
    be represented by the filter choices that is their main characteristic.
  - Drop non standard revision attr and replace with dev_info on probe.
  - Avoid a race in probe.
  - Various formatting fixes.
  - Kernel-docify docs that were very nearly in the write format.
* tsl2583
  - Constify attribute_group structure.
* zpa2326
  - Drop a redundant DEBUG ifdef.

Cleanups (Tools)
* iio_generic_buffer
  - Fix the ? arguement. Previously it sort of worked as you got the help
    message as a result of it not recognising the arguement.
parents 26f64a6b 30df2d18
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
@@ -329,6 +329,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_pressure_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_humidityrelative_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_illuminance_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_illuminance_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_countY_scale
KernelVersion:	2.6.35
KernelVersion:	2.6.35
Contact:	linux-iio@vger.kernel.org
Contact:	linux-iio@vger.kernel.org
Description:
Description:
@@ -1579,3 +1580,20 @@ Contact: linux-iio@vger.kernel.org
Description:
Description:
		Raw (unscaled no offset etc.) electric conductivity reading that
		Raw (unscaled no offset etc.) electric conductivity reading that
		can be processed to siemens per meter.
		can be processed to siemens per meter.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_raw
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Raw counter device counts from channel Y. For quadrature
		counters, multiplication by an available [Y]_scale results in
		the counts of a single quadrature signal phase from channel Y.

What:		/sys/bus/iio/devices/iio:deviceX/in_indexY_raw
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Raw counter device index value from channel Y. This attribute
		provides an absolute positional reference (e.g. a pulse once per
		revolution) which may be used to home positional systems as
		required.
+125 −0
Original line number Original line Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available
What:		/sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
What:		/sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
What:		/sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
What:		/sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
What:		/sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Discrete set of available values for the respective counter
		configuration are listed in this file.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_count_direction
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Read-only attribute that indicates whether the counter for
		channel Y is counting up or down.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Count mode for channel Y. Four count modes are available:
		normal, range limit, non-recycle, and modulo-n. The preset value
		for channel Y is used by the count mode where required.

		Normal:
			Counting is continuous in either direction.

		Range Limit:
			An upper or lower limit is set, mimicking limit switches
			in the mechanical counterpart. The upper limit is set to
			the preset value, while the lower limit is set to 0. The
			counter freezes at count = preset when counting up, and
			at count = 0 when counting down. At either of these
			limits, the counting is resumed only when the count
			direction is reversed.

		Non-recycle:
			Counter is disabled whenever a 24-bit count overflow or
			underflow takes place. The counter is re-enabled when a
			new count value is loaded to the counter via a preset
			operation or write to raw.

		Modulo-N:
			A count boundary is set between 0 and the preset value.
			The counter is reset to 0 at count = preset when
			counting up, while the counter is set to the preset
			value at count = 0 when counting down; the counter does
			not freeze at the bundary points, but counts
			continuously throughout.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Read-only attribute that indicates whether excessive noise is
		present at the channel Y count inputs in quadrature clock mode;
		irrelevant in non-quadrature clock mode.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_preset
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		If the counter device supports preset registers, the preset
		count for channel Y is provided by this attribute.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Configure channel Y counter for non-quadrature or quadrature
		clock mode. Selecting non-quadrature clock mode will disable
		synchronous load mode. In quadrature clock mode, the channel Y
		scale attribute selects the encoder phase division (scale of 1
		selects full-cycle, scale of 0.5 selects half-cycle, scale of
		0.25 selects quarter-cycle) processed by the channel Y counter.

		Non-quadrature:
			The filter and decoder circuit are bypassed. Encoder A
			input serves as the count input and B as the UP/DOWN
			direction control input, with B = 1 selecting UP Count
			mode and B = 0 selecting Down Count mode.

		Quadrature:
			Encoder A and B inputs are digitally filtered and
			decoded for UP/DN clock.

What:		/sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Whether to set channel Y counter with channel Y preset value
		when channel Y index input is active, or continuously count.
		Valid attribute values are boolean.

What:		/sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Active level of channel Y index input; irrelevant in
		non-synchronous load mode.

What:		/sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
KernelVersion:	4.9
Contact:	linux-iio@vger.kernel.org
Description:
		Configure channel Y counter for non-synchronous or synchronous
		load mode. Synchronous load mode cannot be selected in
		non-quadrature clock mode.

		Non-synchronous:
			A logic low level is the active level at this index
			input. The index function (as enabled via
			set_to_preset_on_index) is performed directly on the
			active level of the index input.

		Synchronous:
			Intended for interfacing with encoder Index output in
			quadrature clock mode. The active level is configured
			via index_polarity. The index function (as enabled via
			set_to_preset_on_index) is performed synchronously with
			the quadrature clock on the active level of the index
			input.
+19 −0
Original line number Original line Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/proximity_on_chip_ambient_infrared_suppression
Date:		January 2011
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
		From ISL29018 Data Sheet (FN6619.4, Oct 8, 2012) regarding the
		infrared suppression:

		Scheme 0, makes full n (4, 8, 12, 16) bits (unsigned) proximity
		detection. The range of Scheme 0 proximity count is from 0 to
		2^n. Logic 1 of this bit, Scheme 1, makes n-1 (3, 7, 11, 15)
		bits (2's complementary) proximity_less_ambient detection. The
		range of Scheme 1 proximity count is from -2^(n-1) to 2^(n-1).
		The sign bit is extended for resolutions less than 16. While
		Scheme 0 has wider dynamic range, Scheme 1 proximity detection
		is less affected by the ambient IR noise variation.

		0 Sensing IR from LED and ambient
		1 Sensing IR from LED with ambient IR rejection
+6 −0
Original line number Original line Diff line number Diff line
@@ -39,11 +39,13 @@ dallas,ds75 Digital Thermometer and Thermostat
dlg,da9053		DA9053: flexible system level PMIC with multicore support
dlg,da9053		DA9053: flexible system level PMIC with multicore support
dlg,da9063		DA9063: system PMIC for quad-core application processors
dlg,da9063		DA9063: system PMIC for quad-core application processors
domintech,dmard09	DMARD09: 3-axis Accelerometer
domintech,dmard09	DMARD09: 3-axis Accelerometer
domintech,dmard10	DMARD10: 3-axis Accelerometer
epson,rx8010		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
epson,rx8010		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
epson,rx8025		High-Stability. I2C-Bus INTERFACE REAL TIME CLOCK MODULE
epson,rx8025		High-Stability. I2C-Bus INTERFACE REAL TIME CLOCK MODULE
epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
fsl,mag3110		MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
fsl,mag3110		MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
fsl,mc13892		MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
fsl,mc13892		MC13892: Power Management Integrated Circuit (PMIC) for i.MX35/51
fsl,mma7660		MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
fsl,mma8450		MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
fsl,mma8450		MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
fsl,mpl3115		MPL3115: Absolute Digital Pressure Sensor
fsl,mpl3115		MPL3115: Absolute Digital Pressure Sensor
fsl,mpr121		MPR121: Proximity Capacitive Touch Sensor Controller
fsl,mpr121		MPR121: Proximity Capacitive Touch Sensor Controller
@@ -57,6 +59,7 @@ 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
maxim,max6625		9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
mc,rv3029c2		Real Time Clock Module with I2C-Bus
mc,rv3029c2		Real Time Clock Module with I2C-Bus
mcube,mc3230		mCube 3-axis 8-bit digital accelerometer
mcube,mc3230		mCube 3-axis 8-bit digital accelerometer
memsic,mxc6225		MEMSIC 2-axis 8-bit digital accelerometer
microchip,mcp4531-502	Microchip 7-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4531-502	Microchip 7-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4531-103	Microchip 7-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4531-103	Microchip 7-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4531-503	Microchip 7-bit Single I2C Digital Potentiometer (50k)
microchip,mcp4531-503	Microchip 7-bit Single I2C Digital Potentiometer (50k)
@@ -121,6 +124,9 @@ microchip,mcp4662-502 Microchip 8-bit Dual I2C Digital Potentiometer with NV Mem
microchip,mcp4662-103	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (10k)
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-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)
microchip,mcp4662-104	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (100k)
miramems,da226		MiraMEMS DA226 2-axis 14-bit digital accelerometer
miramems,da280		MiraMEMS DA280 3-axis 14-bit digital accelerometer
miramems,da311		MiraMEMS DA311 3-axis 12-bit digital accelerometer
national,lm63		Temperature sensor with integrated fan control
national,lm63		Temperature sensor with integrated fan control
national,lm75		I2C TEMP SENSOR
national,lm75		I2C TEMP SENSOR
national,lm80		Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
national,lm80		Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor
+2 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,7 @@
Required properties:
Required properties:
 - compatible: Should be "ti,adc141s626" or "ti,adc161s626"
 - compatible: Should be "ti,adc141s626" or "ti,adc161s626"
 - reg: spi chip select number for the device
 - reg: spi chip select number for the device
 - vdda-supply: supply voltage to VDDA pin


Recommended properties:
Recommended properties:
 - spi-max-frequency: Definition as per
 - spi-max-frequency: Definition as per
@@ -11,6 +12,7 @@ Recommended properties:
Example:
Example:
adc@0 {
adc@0 {
	compatible = "ti,adc161s626";
	compatible = "ti,adc161s626";
	vdda-supply = <&vdda_fixed>;
	reg = <0>;
	reg = <0>;
	spi-max-frequency = <4300000>;
	spi-max-frequency = <4300000>;
};
};
Loading