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

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

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

Merge tag 'iio-for-4.19b' 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 cleanups.

There are also a couple of fixes that can wait for the coming merge
window.

Core new features

* Support for phase channels (used in time of flight sensors amongst
  other things)
* Support for deep UV light channel modifier.

New Device Support

* AD4758 DAC
  - New driver and dt bindings.
* adxl345
  - Support the adxl375 +-200g part which is register compatible.
* isl29501 Time of flight sensor.
  - New driver
* meson-saradc
  - Support the Meson8m2 Socs - right now this is just an ID, but there will
    be additional difference in future.
* mpu6050
  - New ID for 6515 variant.
* si1133 UV sensor.
  - New driver
* Spreadtrum SC27xx PMIC ADC
  - New driver and dt bindings.

Features

* adxl345
  - Add calibration offset readback and writing.
  - Add sampling frequency control.

Fixes and Cleanups

* ad5933
  - Use a macro for the channel definition to reduce duplication.
* ad9523
  - Replace use of core mlock with a local lock. Part of ongoing efforts
    to avoid confusing the purpose of mlock which is only about iio core
    state changes.
  - Fix displayed phase which was out by a factor of 10.
* adxl345
  - Add a link to the datasheet.
  - Rework the use of the address field in the chan_spec structures to
    allow addition of more per channel information.
* adis imu
  - Mark switch fall throughs.
* at91-sama5d2
  - Fix some casting on big endian systems.
* bmp280
  - Drop some DT elements that aren't used and should mostly be done from
    userspace rather than in DT.
* hx711
  - add clock-frequency dt binding and resulting delay to deal with capacitance
    issue on some boards.
  - fix a spurious unit-address in the example.
* ina2xx
  - Avoid a possible kthread_stop with a stale task_struct.
* ltc2632
  - Remove some unused local variables (assigned but value never used).
* max1363
  - Use device_get_match_data to remove some boilerplate.
* mma8452
  - Mark switch fall throughs.
* sca3000
  - Fix a missing return in a switch statement (a bad fallthrough
    previously!)
* sigma-delta-modulator
  - Drop incorrect unit address from the DT example.
* st_accel
  - Use device_get_match_data to drop some boiler plate.
  - Move to probe_new for i2c driver as second parameter not used.
* st_sensors library
  - Use a strlcpy (safe in this case).
* st_lsm6dsx
  - Add some error logging.
* ti-ads7950
  - SPDX
  - Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms
    EV3 where some channels are used for power supply monitoring at a very low
    rate.
* ti-dac5571
  - Remove an unused variable.
* xadc
  - Drop some dead code.
parents 4a965c5f c5b974be
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -1307,13 +1307,16 @@ What: /sys/.../iio:deviceX/in_intensityY_raw
What:		/sys/.../iio:deviceX/in_intensityY_ir_raw
What:		/sys/.../iio:deviceX/in_intensityY_both_raw
What:		/sys/.../iio:deviceX/in_intensityY_uv_raw
What:		/sys/.../iio:deviceX/in_intensityY_duv_raw
KernelVersion:	3.4
Contact:	linux-iio@vger.kernel.org
Description:
		Unit-less light intensity. Modifiers both and ir indicate
		that measurements contain visible and infrared light
		components or just infrared light, respectively. Modifier uv indicates
		that measurements contain ultraviolet light components.
		components or just infrared light, respectively. Modifier
		uv indicates that measurements contain ultraviolet light
		components. Modifier duv indicates that measurements
		contain deep ultraviolet light components.

What:		/sys/.../iio:deviceX/in_uvindex_input
KernelVersion:	4.6
@@ -1675,3 +1678,10 @@ KernelVersion: 4.12
Contact:	linux-iio@vger.kernel.org
Description:
		Raw counter device counters direction for channel Y.

What:		/sys/bus/iio/devices/iio:deviceX/in_phaseY_raw
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		Raw (unscaled) phase difference reading from channel Y
		that can be processed to radians.
 No newline at end of file
+47 −0
Original line number Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain
What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_agc_gain_bias
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		This sensor has an automatic gain control (agc) loop
		which sets the analog signal levels at an optimum
		level by controlling programmable gain amplifiers. The
		criteria for optimal gain is determined by the sensor.

		Return the actual gain value as an integer in [0; 65536]
		range when read from.

		The agc gain read when measuring crosstalk shall be
		written into in_proximity0_agc_gain_bias.

What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_a
What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_temp_b
What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_a
What:		/sys/bus/iio/devices/iio:deviceX/in_proximity0_calib_phase_light_b
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		The sensor is able to perform correction of distance
		measurements due to changing temperature and ambient
		light conditions. It can be programmed to correct for
		a second order error polynomial.

		Phase data has to be collected when temperature and
		ambient light are modulated independently.

		Then a least squares curve fit to a second order
		polynomial has to be generated from the data. The
		resultant curves have the form ax^2 + bx + c.

		From those two curves, a and b coefficients shall be
		stored in in_proximity0_calib_phase_temp_a and
		in_proximity0_calib_phase_temp_b for temperature and
		in in_proximity0_calib_phase_light_a and
		in_proximity0_calib_phase_light_b for ambient light.

		Those values must be integer in [0; 8355840] range.

		Finally, the c constant is set by the sensor
		internally.

		The value stored in sensor is displayed when read from.
+22 −0
Original line number Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_ir_small_raw
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		Unit-less infrared intensity. The intensity is measured from 1
		dark photodiode. "small" indicate the surface area capturing
		infrared.

What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_ir_large_raw
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		Unit-less infrared intensity. The intensity is measured from 4
		dark photodiodes. "large" indicate the surface area capturing
		infrared.

What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_large_raw
KernelVersion:	4.18
Contact:	linux-iio@vger.kernel.org
Description:
		Unit-less light intensity with more diodes.
+5 −2
Original line number Diff line number Diff line
Analog Devices ADXL345 3-Axis, +/-(2g/4g/8g/16g) Digital Accelerometer
Analog Devices ADXL345/ADXL375 3-Axis Digital Accelerometers

http://www.analog.com/en/products/mems/accelerometers/adxl345.html
http://www.analog.com/en/products/sensors-mems/accelerometers/adxl375.html

Required properties:
 - compatible : should be "adi,adxl345"
 - compatible : should be one of
		"adi,adxl345"
		"adi,adxl375"
 - reg : the I2C address or SPI chip select number of the sensor

Required properties for SPI bus usage:
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Required properties:
- compatible:	depending on the SoC this should be one of:
			- "amlogic,meson8-saradc" for Meson8
			- "amlogic,meson8b-saradc" for Meson8b
			- "amlogic,meson8m2-saradc" for Meson8m2
			- "amlogic,meson-gxbb-saradc" for GXBB
			- "amlogic,meson-gxl-saradc" for GXL
			- "amlogic,meson-gxm-saradc" for GXM
Loading