Skip to content

Commit 34ff6c2

Browse files
committed
Merge tag 'iio-for-4.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: First set of IIO new device support, features and cleanup for the 4.12 cycle. Quite a bit of outreachy activity here with a driver from a current intern and a number of cleanup patches as part of the next round. Getting a pull request in early this cycle as it's looking like another large cycle for IIO. New device support * adxl345 - initial device support. Note, once complete support is done the intent is to superceded the driver in input/misc. - bindings. - conversion from i2c direct calls to regmap and driver split. - spi support. * chromeos light and proximity. - new driver. * devantech srf04 ultrasonic ranger - new driver with device tree bindings. * hid temperature - new driver for environemntal temperature support from hid devices. * max30102 oximeter - new driver with device tree bindings. * st lsm6dsx - refactor and addition of device support for lsm6dsl and lsm6ds3h. Staging graduation * isl29028 including copyright notice update to reflect Brian's work. * lpc32xx_adc. * spear adc. It's not perfect and there are some datasheet disagreements, but it works and is good enough to graduate. New features * documentation - abi docs for in_proximity_sampling_frequency_available. - generalise counting direction ABI docs as a second driver is going to use them. * hid-sensor-prox - Add support for HID_USAGE_SENSOR_HUMAN_PRESENCE if used on a particular device. * isl29028 - runtime pm. * meson-saradc - switch from polling to interrupt mode and improved read_raw_sample function to avoid unnecessary loop. * tmp007 - interrupt and threshold event support. Cleanups and minor fixes * ad2s1210 - permissions to octal. * ad7192 - permissions to octal. - use BIT macro. * ad9832 - merge header definitions into source file. * ad9834 - merge header definitions into source file. * ade7753 - merge header definitions into source file. - cleanup include ordering. * ade7854 - simplify return logic. * adis16201 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16203 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16209 - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adis16240 - permissions to octal. - merge header definitions into source file. - rename _core.c to .c as there is nothing else. * adt7136 - permissions to octal. * cio-dac - set missing parent device. * documentation - update version numbers on sysfs ABI for counter bits that didn't quite. make 4.9. * isl29028 - mdelay to msleep. - incorrrect sleep time when taking first proximity reading. * lmp91000 - set missing parent device. * lpc32xx - Consistent prefixes for defines. - rename local state structure to _state. * max30100 - set missing parent device. * max30102 - set missing parent device. * maxim-thermocouple - set missing parent device. * meter driver header - permissions to octal. * pulsedlight-lidar-lite-v2 - set missing parent device. * quad-8 - set missing parent device. * st104 - set missing parent device. Other * Mailmap - update Matt Ranostay's email address to the Konsolko one.
2 parents cc4e33d + 2df79e1 commit 34ff6c2

74 files changed

Lines changed: 3403 additions & 1128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.mailmap‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@osg.samsung.com>
109109
Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@s-opensource.com>
110110
Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.com>
111111
Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
112+
Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
112113
Mayuresh Janorkar <mayur@ti.com>
113114
Michael Buesch <m@bues.ch>
114115
Michel Dänzer <michel@tungstengraphics.com>

‎Documentation/ABI/testing/sysfs-bus-iio‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Description:
5555
then it is to be found in the base device directory.
5656

5757
What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
58+
What: /sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available
5859
What: /sys/.../iio:deviceX/buffer/sampling_frequency_available
5960
What: /sys/bus/iio/devices/triggerX/sampling_frequency_available
6061
KernelVersion: 2.6.35
@@ -1593,18 +1594,32 @@ Description:
15931594
can be processed to siemens per meter.
15941595

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

16031604
What: /sys/bus/iio/devices/iio:deviceX/in_indexY_raw
1604-
KernelVersion: 4.9
1605+
KernelVersion: 4.10
16051606
Contact: linux-iio@vger.kernel.org
16061607
Description:
16071608
Raw counter device index value from channel Y. This attribute
16081609
provides an absolute positional reference (e.g. a pulse once per
16091610
revolution) which may be used to home positional systems as
16101611
required.
1612+
1613+
What: /sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available
1614+
KernelVersion: 4.12
1615+
Contact: linux-iio@vger.kernel.org
1616+
Description:
1617+
A list of possible counting directions which are:
1618+
- "up" : counter device is increasing.
1619+
- "down": counter device is decreasing.
1620+
1621+
What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_direction
1622+
KernelVersion: 4.12
1623+
Contact: linux-iio@vger.kernel.org
1624+
Description:
1625+
Raw counter device counters direction for channel Y.

‎Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
What: /sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available
21
What: /sys/bus/iio/devices/iio:deviceX/in_count_count_mode_available
32
What: /sys/bus/iio/devices/iio:deviceX/in_count_noise_error_available
43
What: /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available
54
What: /sys/bus/iio/devices/iio:deviceX/in_index_index_polarity_available
65
What: /sys/bus/iio/devices/iio:deviceX/in_index_synchronous_mode_available
7-
KernelVersion: 4.9
6+
KernelVersion: 4.10
87
Contact: linux-iio@vger.kernel.org
98
Description:
109
Discrete set of available values for the respective counter
1110
configuration are listed in this file.
1211

13-
What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_direction
14-
KernelVersion: 4.9
15-
Contact: linux-iio@vger.kernel.org
16-
Description:
17-
Read-only attribute that indicates whether the counter for
18-
channel Y is counting up or down.
19-
2012
What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_mode
21-
KernelVersion: 4.9
13+
KernelVersion: 4.10
2214
Contact: linux-iio@vger.kernel.org
2315
Description:
2416
Count mode for channel Y. Four count modes are available:
@@ -52,22 +44,22 @@ Description:
5244
continuously throughout.
5345

5446
What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error
55-
KernelVersion: 4.9
47+
KernelVersion: 4.10
5648
Contact: linux-iio@vger.kernel.org
5749
Description:
5850
Read-only attribute that indicates whether excessive noise is
5951
present at the channel Y count inputs in quadrature clock mode;
6052
irrelevant in non-quadrature clock mode.
6153

6254
What: /sys/bus/iio/devices/iio:deviceX/in_countY_preset
63-
KernelVersion: 4.9
55+
KernelVersion: 4.10
6456
Contact: linux-iio@vger.kernel.org
6557
Description:
6658
If the counter device supports preset registers, the preset
6759
count for channel Y is provided by this attribute.
6860

6961
What: /sys/bus/iio/devices/iio:deviceX/in_countY_quadrature_mode
70-
KernelVersion: 4.9
62+
KernelVersion: 4.10
7163
Contact: linux-iio@vger.kernel.org
7264
Description:
7365
Configure channel Y counter for non-quadrature or quadrature
@@ -88,22 +80,22 @@ Description:
8880
decoded for UP/DN clock.
8981

9082
What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index
91-
KernelVersion: 4.9
83+
KernelVersion: 4.10
9284
Contact: linux-iio@vger.kernel.org
9385
Description:
9486
Whether to set channel Y counter with channel Y preset value
9587
when channel Y index input is active, or continuously count.
9688
Valid attribute values are boolean.
9789

9890
What: /sys/bus/iio/devices/iio:deviceX/in_indexY_index_polarity
99-
KernelVersion: 4.9
91+
KernelVersion: 4.10
10092
Contact: linux-iio@vger.kernel.org
10193
Description:
10294
Active level of channel Y index input; irrelevant in
10395
non-synchronous load mode.
10496

10597
What: /sys/bus/iio/devices/iio:deviceX/in_indexY_synchronous_mode
106-
KernelVersion: 4.9
98+
KernelVersion: 4.10
10799
Contact: linux-iio@vger.kernel.org
108100
Description:
109101
Configure channel Y counter for non-synchronous or synchronous
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Analog Devices ADXL345 3-Axis, +/-(2g/4g/8g/16g) Digital Accelerometer
2+
3+
http://www.analog.com/en/products/mems/accelerometers/adxl345.html
4+
5+
Required properties:
6+
- compatible : should be "adi,adxl345"
7+
- reg : the I2C address or SPI chip select number of the sensor
8+
9+
Required properties for SPI bus usage:
10+
- spi-max-frequency : set maximum clock frequency, must be 5000000
11+
- spi-cpol and spi-cpha : must be defined for adxl345 to enable SPI mode 3
12+
13+
Optional properties:
14+
- interrupt-parent : phandle to the parent interrupt controller as documented
15+
in Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
16+
- interrupts: interrupt mapping for IRQ as documented in
17+
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
18+
19+
Example for a I2C device node:
20+
21+
accelerometer@2a {
22+
compatible = "adi,adxl345";
23+
reg = <0x53>;
24+
interrupt-parent = <&gpio1>;
25+
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
26+
};
27+
28+
Example for a SPI device node:
29+
30+
accelerometer@0 {
31+
compatible = "adi,adxl345";
32+
reg = <0>;
33+
spi-max-frequency = <5000000>;
34+
spi-cpol;
35+
spi-cpha;
36+
interrupt-parent = <&gpio1>;
37+
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
38+
};

‎Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Required properties:
77
- "amlogic,meson-gxm-saradc" for GXM
88
along with the generic "amlogic,meson-saradc"
99
- reg: the physical base address and length of the registers
10+
- interrupts: the interrupt indicating end of sampling
1011
- clocks: phandle and clock identifier (see clock-names)
1112
- clock-names: mandatory clocks:
1213
- "clkin" for the reference clock (typically XTAL)
@@ -23,6 +24,7 @@ Example:
2324
compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
2425
#io-channel-cells = <1>;
2526
reg = <0x0 0x8680 0x0 0x34>;
27+
interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
2628
clocks = <&xtal>,
2729
<&clkc CLKID_SAR_ADC>,
2830
<&clkc CLKID_SANA>,
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Maxim MAX30102 heart rate and pulse oximeter sensor
2+
3+
* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf
4+
5+
Required properties:
6+
- compatible: must be "maxim,max30102"
7+
- reg: the I2C address of the sensor
8+
- interrupt-parent: should be the phandle for the interrupt controller
9+
- interrupts: the sole interrupt generated by the device
10+
11+
Refer to interrupt-controller/interrupts.txt for generic
12+
interrupt client node bindings.
13+
14+
Optional properties:
15+
- maxim,red-led-current-microamp: configuration for RED LED current
16+
- maxim,ir-led-current-microamp: configuration for IR LED current
17+
18+
Note that each step is approximately 200 microamps, ranging from 0 uA to
19+
50800 uA.
20+
21+
Example:
22+
23+
max30100@57 {
24+
compatible = "maxim,max30102";
25+
reg = <0x57>;
26+
maxim,red-led-current-microamp = <7000>;
27+
maxim,ir-led-current-microamp = <7000>;
28+
interrupt-parent = <&gpio1>;
29+
interrupts = <16 2>;
30+
};

‎Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Required properties:
44
- compatible: must be one of:
55
"st,lsm6ds3"
6+
"st,lsm6ds3h"
7+
"st,lsm6dsl"
68
"st,lsm6dsm"
79
- reg: i2c address of the sensor / spi cs line
810

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
* Devantech SRF04 ultrasonic range finder
2+
Bit-banging driver using two GPIOs
3+
4+
Required properties:
5+
- compatible: Should be "devantech,srf04"
6+
7+
- trig-gpios: Definition of the GPIO for the triggering (output)
8+
This GPIO is set for about 10 us by the driver to tell the
9+
device it should initiate the measurement cycle.
10+
11+
- echo-gpios: Definition of the GPIO for the echo (input)
12+
This GPIO is set by the device as soon as an ultrasonic
13+
burst is sent out and reset when the first echo is
14+
received.
15+
Thus this GPIO is set while the ultrasonic waves are doing
16+
one round trip.
17+
It needs to be an GPIO which is able to deliver an
18+
interrupt because the time between two interrupts is
19+
measured in the driver.
20+
See Documentation/devicetree/bindings/gpio/gpio.txt for
21+
information on how to specify a consumer gpio.
22+
23+
Example:
24+
srf04@0 {
25+
compatible = "devantech,srf04";
26+
trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
27+
echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
28+
};

‎MAINTAINERS‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3853,6 +3853,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
38533853
S: Maintained
38543854
F: drivers/usb/dwc3/
38553855

3856+
DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER
3857+
M: Andreas Klinger <ak@it-klinger.de>
3858+
L: linux-iio@vger.kernel.org
3859+
S: Maintained
3860+
F: drivers/iio/proximity/srf*.c
3861+
38563862
DEVICE COREDUMP (DEV_COREDUMP)
38573863
M: Johannes Berg <johannes@sipsolutions.net>
38583864
L: linux-kernel@vger.kernel.org

‎drivers/iio/accel/Kconfig‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@
55

66
menu "Accelerometers"
77

8+
config ADXL345
9+
tristate
10+
11+
config ADXL345_I2C
12+
tristate "Analog Devices ADXL345 3-Axis Digital Accelerometer I2C Driver"
13+
depends on INPUT_ADXL34X=n
14+
depends on I2C
15+
select ADXL345
16+
select REGMAP_I2C
17+
help
18+
Say Y here if you want to build support for the Analog Devices
19+
ADXL345 3-axis digital accelerometer.
20+
21+
To compile this driver as a module, choose M here: the module
22+
will be called adxl345_i2c and you will also get adxl345_core
23+
for the core module.
24+
25+
config ADXL345_SPI
26+
tristate "Analog Devices ADXL345 3-Axis Digital Accelerometer SPI Driver"
27+
depends on INPUT_ADXL34X=n
28+
depends on SPI
29+
select ADXL345
30+
select REGMAP_SPI
31+
help
32+
Say Y here if you want to build support for the Analog Devices
33+
ADXL345 3-axis digital accelerometer.
34+
35+
To compile this driver as a module, choose M here: the module
36+
will be called adxl345_spi and you will also get adxl345_core
37+
for the core module.
38+
839
config BMA180
940
tristate "Bosch BMA180/BMA250 3-Axis Accelerometer Driver"
1041
depends on I2C

0 commit comments

Comments
 (0)