forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/ke…
…rnel/git/gregkh/staging Pull staging/iio driver updates from Greg KH: "Here is the big staging and iio driver patchsets for 4.11-rc1. We almost broke even this time around, with only a few thousand lines added overall, as we removed the old and obsolete i4l code, but added some new drivers for the RPi platform, as well as adding some new IIO drivers. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits) Staging: vc04_services: Fix the "space prohibited" code style errors Staging: vc04_services: Fix the "wrong indent" code style errors staging: octeon: Use net_device_stats from struct net_device Staging: rtl8192u: ieee80211: ieee80211.h - style fix Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Staging: rtl8192u: r8192U.h - style fix Staging: rtl8192u: r8192U_core.c - style fix Staging: rtl8192u: r819xU_cmdpkt.c - style fix staging: rtl8192u: blank lines aren't necessary before a close brace '}' staging: rtl8192u: Adding space after enum and struct definition staging: rtl8192u: Adding space after struct definition Staging: ks7010: Add required and preferred spaces around operators Staging: ks7010: ks*: Remove redundant blank lines Staging: ks7010: ks*: Add missing blank lines after declarations staging: visorbus, replace init_timer with setup_timer staging: vt6656: rxtx.c Removed multiple dereferencing staging: vt6656: Alignment match open parenthesis ...
- Loading branch information
Showing
669 changed files
with
25,666 additions
and
20,818 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 |
---|---|---|
|
@@ -170,6 +170,16 @@ Description: | |
Has all of the equivalent parameters as per voltageY. Units | ||
after application of scale and offset are m/s^2. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_x_raw | ||
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_y_raw | ||
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_z_raw | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Gravity in direction x, y or z (may be arbitrarily assigned | ||
but should match other such assignments on device). | ||
Units after application of scale and offset are m/s^2. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_x_raw | ||
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_raw | ||
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_raw | ||
|
@@ -805,7 +815,7 @@ Description: | |
attribute. E.g. if in_voltage0_raw_thresh_rising_value is set to 1200 | ||
and in_voltage0_raw_thresh_rising_hysteresis is set to 50. The event | ||
will get activated once in_voltage0_raw goes above 1200 and will become | ||
deactived again once the value falls below 1150. | ||
deactivated again once the value falls below 1150. | ||
|
||
What: /sys/.../events/in_accel_x_raw_roc_rising_value | ||
What: /sys/.../events/in_accel_x_raw_roc_falling_value | ||
|
@@ -1245,7 +1255,8 @@ Description: | |
reflectivity of infrared or ultrasound emitted. | ||
Often these sensors are unit less and as such conversion | ||
to SI units is not possible. Higher proximity measurements | ||
indicate closer objects, and vice versa. | ||
indicate closer objects, and vice versa. Units after | ||
application of scale and offset are meters. | ||
|
||
What: /sys/.../iio:deviceX/in_illuminance_input | ||
What: /sys/.../iio:deviceX/in_illuminance_raw | ||
|
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 @@ | ||
What: /sys/bus/iio/devices/triggerX/trigger_polarity | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
The STM32 ADC can be configured to use external trigger sources | ||
(e.g. timers, pwm or exti gpio). Then, it can be tuned to start | ||
conversions on external trigger by either: | ||
- "rising-edge" | ||
- "falling-edge" | ||
- "both-edges". | ||
Reading returns current trigger polarity. | ||
Writing value before enabling conversions sets trigger polarity. | ||
|
||
What: /sys/bus/iio/devices/triggerX/trigger_polarity_available | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
List all available trigger_polarity settings. |
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,22 @@ | ||
What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity | ||
Date: January 2017 | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Show or set the gain boost of the amp, from 0-31 range. | ||
default 31 | ||
|
||
What /sys/bus/iio/devices/iio:deviceX/sensor_max_range | ||
Date: January 2017 | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Show or set the maximum range between the sensor and the | ||
first object echoed in meters. Default value is 6.020. | ||
This setting limits the time the driver is waiting for a | ||
echo. | ||
Showing the range of available values is represented as the | ||
minimum value, the step and the maximum value, all enclosed | ||
in square brackets. | ||
Example: | ||
[0.043 0.043 11.008] |
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,29 @@ | ||
What: /sys/bus/iio/devices/triggerX/master_mode_available | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Reading returns the list possible master modes which are: | ||
- "reset" : The UG bit from the TIMx_EGR register is used as trigger output (TRGO). | ||
- "enable" : The Counter Enable signal CNT_EN is used as trigger output. | ||
- "update" : The update event is selected as trigger output. | ||
For instance a master timer can then be used as a prescaler for a slave timer. | ||
- "compare_pulse" : The trigger output send a positive pulse when the CC1IF flag is to be set. | ||
- "OC1REF" : OC1REF signal is used as trigger output. | ||
- "OC2REF" : OC2REF signal is used as trigger output. | ||
- "OC3REF" : OC3REF signal is used as trigger output. | ||
- "OC4REF" : OC4REF signal is used as trigger output. | ||
|
||
What: /sys/bus/iio/devices/triggerX/master_mode | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Reading returns the current master modes. | ||
Writing set the master mode | ||
|
||
What: /sys/bus/iio/devices/triggerX/sampling_frequency | ||
KernelVersion: 4.11 | ||
Contact: [email protected] | ||
Description: | ||
Reading returns the current sampling frequency. | ||
Writing an value different of 0 set and start sampling. | ||
Writing 0 stop sampling. |
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
32 changes: 32 additions & 0 deletions
32
Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.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,32 @@ | ||
* Amlogic Meson SAR (Successive Approximation Register) A/D converter | ||
|
||
Required properties: | ||
- compatible: depending on the SoC this should be one of: | ||
- "amlogic,meson-gxbb-saradc" for GXBB | ||
- "amlogic,meson-gxl-saradc" for GXL | ||
- "amlogic,meson-gxm-saradc" for GXM | ||
along with the generic "amlogic,meson-saradc" | ||
- reg: the physical base address and length of the registers | ||
- clocks: phandle and clock identifier (see clock-names) | ||
- clock-names: mandatory clocks: | ||
- "clkin" for the reference clock (typically XTAL) | ||
- "core" for the SAR ADC core clock | ||
optional clocks: | ||
- "sana" for the analog clock | ||
- "adc_clk" for the ADC (sampling) clock | ||
- "adc_sel" for the ADC (sampling) clock mux | ||
- vref-supply: the regulator supply for the ADC reference voltage | ||
- #io-channel-cells: must be 1, see ../iio-bindings.txt | ||
|
||
Example: | ||
saradc: adc@8680 { | ||
compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc"; | ||
#io-channel-cells = <1>; | ||
reg = <0x0 0x8680 0x0 0x34>; | ||
clocks = <&xtal>, | ||
<&clkc CLKID_SAR_ADC>, | ||
<&clkc CLKID_SANA>, | ||
<&clkc CLKID_SAR_ADC_CLK>, | ||
<&clkc CLKID_SAR_ADC_SEL>; | ||
clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel"; | ||
}; |
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 @@ | ||
* AVIA HX711 ADC chip for weight cells | ||
Bit-banging driver | ||
|
||
Required properties: | ||
- compatible: Should be "avia,hx711" | ||
- sck-gpios: Definition of the GPIO for the clock | ||
- dout-gpios: Definition of the GPIO for data-out | ||
See Documentation/devicetree/bindings/gpio/gpio.txt | ||
- avdd-supply: Definition of the regulator used as analog supply | ||
|
||
Example: | ||
weight@0 { | ||
compatible = "avia,hx711"; | ||
sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; | ||
dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; | ||
avdd-suppy = <&avdd>; | ||
}; | ||
|
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 @@ | ||
* Maxim max11100 Analog to Digital Converter (ADC) | ||
|
||
Required properties: | ||
- compatible: Should be "maxim,max11100" | ||
- reg: the adc unit address | ||
- vref-supply: phandle to the regulator that provides reference voltage | ||
|
||
Optional properties: | ||
- spi-max-frequency: SPI maximum frequency | ||
|
||
Example: | ||
|
||
max11100: adc@0 { | ||
compatible = "maxim,max11100"; | ||
reg = <0>; | ||
vref-supply = <&adc0_vref>; | ||
spi-max-frequency = <240000>; | ||
}; |
149 changes: 149 additions & 0 deletions
149
Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.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,149 @@ | ||
Qualcomm's PM8xxx voltage XOADC | ||
|
||
The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal | ||
oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921. | ||
|
||
Required properties: | ||
|
||
- compatible: should be one of: | ||
"qcom,pm8018-adc" | ||
"qcom,pm8038-adc" | ||
"qcom,pm8058-adc" | ||
"qcom,pm8921-adc" | ||
|
||
- reg: should contain the ADC base address in the PMIC, typically | ||
0x197. | ||
|
||
- xoadc-ref-supply: should reference a regulator that can supply | ||
a reference voltage on demand. The reference voltage may vary | ||
with PMIC variant but is typically something like 2.2 or 1.8V. | ||
|
||
The following required properties are standard for IO channels, see | ||
iio-bindings.txt for more details: | ||
|
||
- #address-cells: should be set to <1> | ||
|
||
- #size-cells: should be set to <0> | ||
|
||
- #io-channel-cells: should be set to <1> | ||
|
||
- interrupts: should refer to the parent PMIC interrupt controller | ||
and reference the proper ADC interrupt. | ||
|
||
Required subnodes: | ||
|
||
The ADC channels are configured as subnodes of the ADC. Since some of | ||
them are used for calibrating the ADC, these nodes are compulsory: | ||
|
||
adc-channel@c { | ||
reg = <0x0c>; | ||
}; | ||
|
||
adc-channel@d { | ||
reg = <0x0d>; | ||
}; | ||
|
||
adc-channel@f { | ||
reg = <0x0f>; | ||
}; | ||
|
||
These three nodes are used for absolute and ratiometric calibration | ||
and only need to have these reg values: they are by hardware definition | ||
1:1 ratio converters that sample 625, 1250 and 0 milliV and create | ||
an interpolation calibration for all other ADCs. | ||
|
||
Optional subnodes: any channels other than channel 0x0c, 0x0d and | ||
0x0f are optional. | ||
|
||
Required channel node properties: | ||
|
||
- reg: should contain the hardware channel number in the range | ||
0 .. 0x0f (4 bits). The hardware only supports 16 channels. | ||
|
||
Optional channel node properties: | ||
|
||
- qcom,decimation: | ||
Value type: <u32> | ||
Definition: This parameter is used to decrease the ADC sampling rate. | ||
Quicker measurements can be made by reducing the decimation ratio. | ||
Valid values are 512, 1024, 2048, 4096. | ||
If the property is not found, a default value of 512 will be used. | ||
|
||
- qcom,ratiometric: | ||
Value type: <u32> | ||
Definition: Channel calibration type. If this property is specified | ||
VADC will use a special voltage references for channel | ||
calibration. The available references are specified in the | ||
as a u32 value setting (see below) and it is compulsory | ||
to also specify this reference if ratiometric calibration | ||
is selected. | ||
|
||
If the property is not found, the channel will be | ||
calibrated with the 0.625V and 1.25V reference channels, also | ||
known as an absolute calibration. | ||
The reference voltage pairs when using ratiometric calibration: | ||
0 = XO_IN/XOADC_GND | ||
1 = PMIC_IN/XOADC_GND | ||
2 = PMIC_IN/BMS_CSP | ||
3 (invalid) | ||
4 = XOADC_GND/XOADC_GND | ||
5 = XOADC_VREF/XOADC_GND | ||
|
||
Example: | ||
|
||
xoadc: xoadc@197 { | ||
compatible = "qcom,pm8058-adc"; | ||
reg = <0x197>; | ||
interrupt-parent = <&pm8058>; | ||
interrupts = <76 1>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
#io-channel-cells = <1>; | ||
|
||
vcoin: adc-channel@0 { | ||
reg = <0x00>; | ||
}; | ||
vbat: adc-channel@1 { | ||
reg = <0x01>; | ||
}; | ||
dcin: adc-channel@2 { | ||
reg = <0x02>; | ||
}; | ||
ichg: adc-channel@3 { | ||
reg = <0x03>; | ||
}; | ||
vph_pwr: adc-channel@4 { | ||
reg = <0x04>; | ||
}; | ||
usb_vbus: adc-channel@a { | ||
reg = <0x0a>; | ||
}; | ||
die_temp: adc-channel@b { | ||
reg = <0x0b>; | ||
}; | ||
ref_625mv: adc-channel@c { | ||
reg = <0x0c>; | ||
}; | ||
ref_1250mv: adc-channel@d { | ||
reg = <0x0d>; | ||
}; | ||
ref_325mv: adc-channel@e { | ||
reg = <0x0e>; | ||
}; | ||
ref_muxoff: adc-channel@f { | ||
reg = <0x0f>; | ||
}; | ||
}; | ||
|
||
|
||
/* IIO client node */ | ||
iio-hwmon { | ||
compatible = "iio-hwmon"; | ||
io-channels = <&xoadc 0x01>, /* Battery */ | ||
<&xoadc 0x02>, /* DC in (charger) */ | ||
<&xoadc 0x04>, /* VPH the main system voltage */ | ||
<&xoadc 0x0b>, /* Die temperature */ | ||
<&xoadc 0x0c>, /* Reference voltage 1.25V */ | ||
<&xoadc 0x0d>, /* Reference voltage 0.625V */ | ||
<&xoadc 0x0e>; /* Reference voltage 0.325V */ | ||
}; |
Oops, something went wrong.