Skip to content

Commit caa5942

Browse files
committed
Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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 ...
2 parents b206461 + 0a44127 commit caa5942

File tree

669 files changed

+25666
-20818
lines changed

Some content is hidden

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

669 files changed

+25666
-20818
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,16 @@ Description:
170170
Has all of the equivalent parameters as per voltageY. Units
171171
after application of scale and offset are m/s^2.
172172

173+
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_x_raw
174+
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_y_raw
175+
What: /sys/bus/iio/devices/iio:deviceX/in_gravity_z_raw
176+
KernelVersion: 4.11
177+
Contact: linux-iio@vger.kernel.org
178+
Description:
179+
Gravity in direction x, y or z (may be arbitrarily assigned
180+
but should match other such assignments on device).
181+
Units after application of scale and offset are m/s^2.
182+
173183
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_x_raw
174184
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_raw
175185
What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_raw
@@ -805,7 +815,7 @@ Description:
805815
attribute. E.g. if in_voltage0_raw_thresh_rising_value is set to 1200
806816
and in_voltage0_raw_thresh_rising_hysteresis is set to 50. The event
807817
will get activated once in_voltage0_raw goes above 1200 and will become
808-
deactived again once the value falls below 1150.
818+
deactivated again once the value falls below 1150.
809819

810820
What: /sys/.../events/in_accel_x_raw_roc_rising_value
811821
What: /sys/.../events/in_accel_x_raw_roc_falling_value
@@ -1245,7 +1255,8 @@ Description:
12451255
reflectivity of infrared or ultrasound emitted.
12461256
Often these sensors are unit less and as such conversion
12471257
to SI units is not possible. Higher proximity measurements
1248-
indicate closer objects, and vice versa.
1258+
indicate closer objects, and vice versa. Units after
1259+
application of scale and offset are meters.
12491260

12501261
What: /sys/.../iio:deviceX/in_illuminance_input
12511262
What: /sys/.../iio:deviceX/in_illuminance_raw
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
What: /sys/bus/iio/devices/triggerX/trigger_polarity
2+
KernelVersion: 4.11
3+
Contact: fabrice.gasnier@st.com
4+
Description:
5+
The STM32 ADC can be configured to use external trigger sources
6+
(e.g. timers, pwm or exti gpio). Then, it can be tuned to start
7+
conversions on external trigger by either:
8+
- "rising-edge"
9+
- "falling-edge"
10+
- "both-edges".
11+
Reading returns current trigger polarity.
12+
Writing value before enabling conversions sets trigger polarity.
13+
14+
What: /sys/bus/iio/devices/triggerX/trigger_polarity_available
15+
KernelVersion: 4.11
16+
Contact: fabrice.gasnier@st.com
17+
Description:
18+
List all available trigger_polarity settings.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
2+
Date: January 2017
3+
KernelVersion: 4.11
4+
Contact: linux-iio@vger.kernel.org
5+
Description:
6+
Show or set the gain boost of the amp, from 0-31 range.
7+
default 31
8+
9+
What /sys/bus/iio/devices/iio:deviceX/sensor_max_range
10+
Date: January 2017
11+
KernelVersion: 4.11
12+
Contact: linux-iio@vger.kernel.org
13+
Description:
14+
Show or set the maximum range between the sensor and the
15+
first object echoed in meters. Default value is 6.020.
16+
This setting limits the time the driver is waiting for a
17+
echo.
18+
Showing the range of available values is represented as the
19+
minimum value, the step and the maximum value, all enclosed
20+
in square brackets.
21+
Example:
22+
[0.043 0.043 11.008]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
What: /sys/bus/iio/devices/triggerX/master_mode_available
2+
KernelVersion: 4.11
3+
Contact: benjamin.gaignard@st.com
4+
Description:
5+
Reading returns the list possible master modes which are:
6+
- "reset" : The UG bit from the TIMx_EGR register is used as trigger output (TRGO).
7+
- "enable" : The Counter Enable signal CNT_EN is used as trigger output.
8+
- "update" : The update event is selected as trigger output.
9+
For instance a master timer can then be used as a prescaler for a slave timer.
10+
- "compare_pulse" : The trigger output send a positive pulse when the CC1IF flag is to be set.
11+
- "OC1REF" : OC1REF signal is used as trigger output.
12+
- "OC2REF" : OC2REF signal is used as trigger output.
13+
- "OC3REF" : OC3REF signal is used as trigger output.
14+
- "OC4REF" : OC4REF signal is used as trigger output.
15+
16+
What: /sys/bus/iio/devices/triggerX/master_mode
17+
KernelVersion: 4.11
18+
Contact: benjamin.gaignard@st.com
19+
Description:
20+
Reading returns the current master modes.
21+
Writing set the master mode
22+
23+
What: /sys/bus/iio/devices/triggerX/sampling_frequency
24+
KernelVersion: 4.11
25+
Contact: benjamin.gaignard@st.com
26+
Description:
27+
Reading returns the current sampling frequency.
28+
Writing an value different of 0 set and start sampling.
29+
Writing 0 stop sampling.

Documentation/devicetree/bindings/i2c/trivial-devices.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dallas,ds1775 Tiny Digital Thermometer and Thermostat
3636
dallas,ds3232 Extremely Accurate I²C RTC with Integrated Crystal and SRAM
3737
dallas,ds4510 CPU Supervisor with Nonvolatile Memory and Programmable I/O
3838
dallas,ds75 Digital Thermometer and Thermostat
39+
devantech,srf08 Devantech SRF08 ultrasonic ranger
3940
dlg,da9053 DA9053: flexible system level PMIC with multicore support
4041
dlg,da9063 DA9063: system PMIC for quad-core application processors
4142
domintech,dmard09 DMARD09: 3-axis Accelerometer

Documentation/devicetree/bindings/iio/accel/lis302.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ that apply in on the generic device (independent from the bus).
55

66

77
Required properties for the SPI bindings:
8-
- compatible: should be set to "st,lis3lv02d_spi"
8+
- compatible: should be set to "st,lis3lv02d-spi"
99
- reg: the chipselect index
1010
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless
1111
constrained by external circuitry
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
* Amlogic Meson SAR (Successive Approximation Register) A/D converter
2+
3+
Required properties:
4+
- compatible: depending on the SoC this should be one of:
5+
- "amlogic,meson-gxbb-saradc" for GXBB
6+
- "amlogic,meson-gxl-saradc" for GXL
7+
- "amlogic,meson-gxm-saradc" for GXM
8+
along with the generic "amlogic,meson-saradc"
9+
- reg: the physical base address and length of the registers
10+
- clocks: phandle and clock identifier (see clock-names)
11+
- clock-names: mandatory clocks:
12+
- "clkin" for the reference clock (typically XTAL)
13+
- "core" for the SAR ADC core clock
14+
optional clocks:
15+
- "sana" for the analog clock
16+
- "adc_clk" for the ADC (sampling) clock
17+
- "adc_sel" for the ADC (sampling) clock mux
18+
- vref-supply: the regulator supply for the ADC reference voltage
19+
- #io-channel-cells: must be 1, see ../iio-bindings.txt
20+
21+
Example:
22+
saradc: adc@8680 {
23+
compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
24+
#io-channel-cells = <1>;
25+
reg = <0x0 0x8680 0x0 0x34>;
26+
clocks = <&xtal>,
27+
<&clkc CLKID_SAR_ADC>,
28+
<&clkc CLKID_SANA>,
29+
<&clkc CLKID_SAR_ADC_CLK>,
30+
<&clkc CLKID_SAR_ADC_SEL>;
31+
clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
32+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* AVIA HX711 ADC chip for weight cells
2+
Bit-banging driver
3+
4+
Required properties:
5+
- compatible: Should be "avia,hx711"
6+
- sck-gpios: Definition of the GPIO for the clock
7+
- dout-gpios: Definition of the GPIO for data-out
8+
See Documentation/devicetree/bindings/gpio/gpio.txt
9+
- avdd-supply: Definition of the regulator used as analog supply
10+
11+
Example:
12+
weight@0 {
13+
compatible = "avia,hx711";
14+
sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
15+
dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
16+
avdd-suppy = <&avdd>;
17+
};
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* Maxim max11100 Analog to Digital Converter (ADC)
2+
3+
Required properties:
4+
- compatible: Should be "maxim,max11100"
5+
- reg: the adc unit address
6+
- vref-supply: phandle to the regulator that provides reference voltage
7+
8+
Optional properties:
9+
- spi-max-frequency: SPI maximum frequency
10+
11+
Example:
12+
13+
max11100: adc@0 {
14+
compatible = "maxim,max11100";
15+
reg = <0>;
16+
vref-supply = <&adc0_vref>;
17+
spi-max-frequency = <240000>;
18+
};
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
Qualcomm's PM8xxx voltage XOADC
2+
3+
The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal
4+
oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921.
5+
6+
Required properties:
7+
8+
- compatible: should be one of:
9+
"qcom,pm8018-adc"
10+
"qcom,pm8038-adc"
11+
"qcom,pm8058-adc"
12+
"qcom,pm8921-adc"
13+
14+
- reg: should contain the ADC base address in the PMIC, typically
15+
0x197.
16+
17+
- xoadc-ref-supply: should reference a regulator that can supply
18+
a reference voltage on demand. The reference voltage may vary
19+
with PMIC variant but is typically something like 2.2 or 1.8V.
20+
21+
The following required properties are standard for IO channels, see
22+
iio-bindings.txt for more details:
23+
24+
- #address-cells: should be set to <1>
25+
26+
- #size-cells: should be set to <0>
27+
28+
- #io-channel-cells: should be set to <1>
29+
30+
- interrupts: should refer to the parent PMIC interrupt controller
31+
and reference the proper ADC interrupt.
32+
33+
Required subnodes:
34+
35+
The ADC channels are configured as subnodes of the ADC. Since some of
36+
them are used for calibrating the ADC, these nodes are compulsory:
37+
38+
adc-channel@c {
39+
reg = <0x0c>;
40+
};
41+
42+
adc-channel@d {
43+
reg = <0x0d>;
44+
};
45+
46+
adc-channel@f {
47+
reg = <0x0f>;
48+
};
49+
50+
These three nodes are used for absolute and ratiometric calibration
51+
and only need to have these reg values: they are by hardware definition
52+
1:1 ratio converters that sample 625, 1250 and 0 milliV and create
53+
an interpolation calibration for all other ADCs.
54+
55+
Optional subnodes: any channels other than channel 0x0c, 0x0d and
56+
0x0f are optional.
57+
58+
Required channel node properties:
59+
60+
- reg: should contain the hardware channel number in the range
61+
0 .. 0x0f (4 bits). The hardware only supports 16 channels.
62+
63+
Optional channel node properties:
64+
65+
- qcom,decimation:
66+
Value type: <u32>
67+
Definition: This parameter is used to decrease the ADC sampling rate.
68+
Quicker measurements can be made by reducing the decimation ratio.
69+
Valid values are 512, 1024, 2048, 4096.
70+
If the property is not found, a default value of 512 will be used.
71+
72+
- qcom,ratiometric:
73+
Value type: <u32>
74+
Definition: Channel calibration type. If this property is specified
75+
VADC will use a special voltage references for channel
76+
calibration. The available references are specified in the
77+
as a u32 value setting (see below) and it is compulsory
78+
to also specify this reference if ratiometric calibration
79+
is selected.
80+
81+
If the property is not found, the channel will be
82+
calibrated with the 0.625V and 1.25V reference channels, also
83+
known as an absolute calibration.
84+
The reference voltage pairs when using ratiometric calibration:
85+
0 = XO_IN/XOADC_GND
86+
1 = PMIC_IN/XOADC_GND
87+
2 = PMIC_IN/BMS_CSP
88+
3 (invalid)
89+
4 = XOADC_GND/XOADC_GND
90+
5 = XOADC_VREF/XOADC_GND
91+
92+
Example:
93+
94+
xoadc: xoadc@197 {
95+
compatible = "qcom,pm8058-adc";
96+
reg = <0x197>;
97+
interrupt-parent = <&pm8058>;
98+
interrupts = <76 1>;
99+
#address-cells = <1>;
100+
#size-cells = <0>;
101+
#io-channel-cells = <1>;
102+
103+
vcoin: adc-channel@0 {
104+
reg = <0x00>;
105+
};
106+
vbat: adc-channel@1 {
107+
reg = <0x01>;
108+
};
109+
dcin: adc-channel@2 {
110+
reg = <0x02>;
111+
};
112+
ichg: adc-channel@3 {
113+
reg = <0x03>;
114+
};
115+
vph_pwr: adc-channel@4 {
116+
reg = <0x04>;
117+
};
118+
usb_vbus: adc-channel@a {
119+
reg = <0x0a>;
120+
};
121+
die_temp: adc-channel@b {
122+
reg = <0x0b>;
123+
};
124+
ref_625mv: adc-channel@c {
125+
reg = <0x0c>;
126+
};
127+
ref_1250mv: adc-channel@d {
128+
reg = <0x0d>;
129+
};
130+
ref_325mv: adc-channel@e {
131+
reg = <0x0e>;
132+
};
133+
ref_muxoff: adc-channel@f {
134+
reg = <0x0f>;
135+
};
136+
};
137+
138+
139+
/* IIO client node */
140+
iio-hwmon {
141+
compatible = "iio-hwmon";
142+
io-channels = <&xoadc 0x01>, /* Battery */
143+
<&xoadc 0x02>, /* DC in (charger) */
144+
<&xoadc 0x04>, /* VPH the main system voltage */
145+
<&xoadc 0x0b>, /* Die temperature */
146+
<&xoadc 0x0c>, /* Reference voltage 1.25V */
147+
<&xoadc 0x0d>, /* Reference voltage 0.625V */
148+
<&xoadc 0x0e>; /* Reference voltage 0.325V */
149+
};

0 commit comments

Comments
 (0)