forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'iio-for-4.12a' of git://git.kernel.org/pub/scm/linux/kerne…
…l/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.
- Loading branch information
Showing
74 changed files
with
3,403 additions
and
1,128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,7 @@ Mauro Carvalho Chehab <[email protected]> <[email protected]> | |
Mauro Carvalho Chehab <[email protected]> <[email protected]> | ||
Matt Ranostay <[email protected]> Matthew Ranostay <[email protected]> | ||
Matt Ranostay <[email protected]> <[email protected]> | ||
Matt Ranostay <[email protected]> <[email protected]> | ||
Mayuresh Janorkar <[email protected]> | ||
Michael Buesch <[email protected]> | ||
Michel Dänzer <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ Description: | |
then it is to be found in the base device directory. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/sampling_frequency_available | ||
What: /sys/bus/iio/devices/iio:deviceX/in_proximity_sampling_frequency_available | ||
What: /sys/.../iio:deviceX/buffer/sampling_frequency_available | ||
What: /sys/bus/iio/devices/triggerX/sampling_frequency_available | ||
KernelVersion: 2.6.35 | ||
|
@@ -1593,18 +1594,32 @@ Description: | |
can be processed to siemens per meter. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_countY_raw | ||
KernelVersion: 4.9 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_count_count_direction_available | ||
KernelVersion: 4.12 | ||
Contact: [email protected] | ||
Description: | ||
A list of possible counting directions which are: | ||
- "up" : counter device is increasing. | ||
- "down": counter device is decreasing. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_countY_count_direction | ||
KernelVersion: 4.12 | ||
Contact: [email protected] | ||
Description: | ||
Raw counter device counters direction for channel Y. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
Description: | ||
Count mode for channel Y. Four count modes are available: | ||
|
@@ -52,22 +44,22 @@ Description: | |
continuously throughout. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_countY_noise_error | ||
KernelVersion: 4.9 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
Description: | ||
Configure channel Y counter for non-quadrature or quadrature | ||
|
@@ -88,22 +80,22 @@ Description: | |
decoded for UP/DN clock. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_countY_set_to_preset_on_index | ||
KernelVersion: 4.9 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
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 | ||
KernelVersion: 4.10 | ||
Contact: [email protected] | ||
Description: | ||
Configure channel Y counter for non-synchronous or synchronous | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Analog Devices ADXL345 3-Axis, +/-(2g/4g/8g/16g) Digital Accelerometer | ||
|
||
http://www.analog.com/en/products/mems/accelerometers/adxl345.html | ||
|
||
Required properties: | ||
- compatible : should be "adi,adxl345" | ||
- reg : the I2C address or SPI chip select number of the sensor | ||
|
||
Required properties for SPI bus usage: | ||
- spi-max-frequency : set maximum clock frequency, must be 5000000 | ||
- spi-cpol and spi-cpha : must be defined for adxl345 to enable SPI mode 3 | ||
|
||
Optional properties: | ||
- interrupt-parent : phandle to the parent interrupt controller as documented | ||
in Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
- interrupts: interrupt mapping for IRQ as documented in | ||
Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
|
||
Example for a I2C device node: | ||
|
||
accelerometer@2a { | ||
compatible = "adi,adxl345"; | ||
reg = <0x53>; | ||
interrupt-parent = <&gpio1>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
}; | ||
|
||
Example for a SPI device node: | ||
|
||
accelerometer@0 { | ||
compatible = "adi,adxl345"; | ||
reg = <0>; | ||
spi-max-frequency = <5000000>; | ||
spi-cpol; | ||
spi-cpha; | ||
interrupt-parent = <&gpio1>; | ||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Maxim MAX30102 heart rate and pulse oximeter sensor | ||
|
||
* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf | ||
|
||
Required properties: | ||
- compatible: must be "maxim,max30102" | ||
- reg: the I2C address of the sensor | ||
- interrupt-parent: should be the phandle for the interrupt controller | ||
- interrupts: the sole interrupt generated by the device | ||
|
||
Refer to interrupt-controller/interrupts.txt for generic | ||
interrupt client node bindings. | ||
|
||
Optional properties: | ||
- maxim,red-led-current-microamp: configuration for RED LED current | ||
- maxim,ir-led-current-microamp: configuration for IR LED current | ||
|
||
Note that each step is approximately 200 microamps, ranging from 0 uA to | ||
50800 uA. | ||
|
||
Example: | ||
|
||
max30100@57 { | ||
compatible = "maxim,max30102"; | ||
reg = <0x57>; | ||
maxim,red-led-current-microamp = <7000>; | ||
maxim,ir-led-current-microamp = <7000>; | ||
interrupt-parent = <&gpio1>; | ||
interrupts = <16 2>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Documentation/devicetree/bindings/iio/proximity/devantech-srf04.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
* Devantech SRF04 ultrasonic range finder | ||
Bit-banging driver using two GPIOs | ||
|
||
Required properties: | ||
- compatible: Should be "devantech,srf04" | ||
|
||
- trig-gpios: Definition of the GPIO for the triggering (output) | ||
This GPIO is set for about 10 us by the driver to tell the | ||
device it should initiate the measurement cycle. | ||
|
||
- echo-gpios: Definition of the GPIO for the echo (input) | ||
This GPIO is set by the device as soon as an ultrasonic | ||
burst is sent out and reset when the first echo is | ||
received. | ||
Thus this GPIO is set while the ultrasonic waves are doing | ||
one round trip. | ||
It needs to be an GPIO which is able to deliver an | ||
interrupt because the time between two interrupts is | ||
measured in the driver. | ||
See Documentation/devicetree/bindings/gpio/gpio.txt for | ||
information on how to specify a consumer gpio. | ||
|
||
Example: | ||
srf04@0 { | ||
compatible = "devantech,srf04"; | ||
trig-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; | ||
echo-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3853,6 +3853,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git | |
S: Maintained | ||
F: drivers/usb/dwc3/ | ||
|
||
DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER | ||
M: Andreas Klinger <[email protected]> | ||
L: [email protected] | ||
S: Maintained | ||
F: drivers/iio/proximity/srf*.c | ||
|
||
DEVICE COREDUMP (DEV_COREDUMP) | ||
M: Johannes Berg <[email protected]> | ||
L: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* ADXL345 3-Axis Digital Accelerometer | ||
* | ||
* Copyright (c) 2017 Eva Rachel Retuya <[email protected]> | ||
* | ||
* This file is subject to the terms and conditions of version 2 of | ||
* the GNU General Public License. See the file COPYING in the main | ||
* directory of this archive for more details. | ||
*/ | ||
|
||
#ifndef _ADXL345_H_ | ||
#define _ADXL345_H_ | ||
|
||
int adxl345_core_probe(struct device *dev, struct regmap *regmap, | ||
const char *name); | ||
int adxl345_core_remove(struct device *dev); | ||
|
||
#endif /* _ADXL345_H_ */ |
Oops, something went wrong.