Merge tag 'ieee802154-for-davem-2019-11-13' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / Documentation / ABI / testing / sysfs-bus-iio-timer-stm32
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
7                                 used as trigger output (TRGO).
8                 - "enable"    : The Counter Enable signal CNT_EN is used
9                                 as trigger output.
10                 - "update"    : The update event is selected as trigger output.
11                                 For instance a master timer can then be used
12                                 as a prescaler for a slave timer.
13                 - "compare_pulse" : The trigger output send a positive pulse
14                                     when the CC1IF flag is to be set.
15                 - "OC1REF"    : OC1REF signal is used as trigger output.
16                 - "OC2REF"    : OC2REF signal is used as trigger output.
17                 - "OC3REF"    : OC3REF signal is used as trigger output.
18                 - "OC4REF"    : OC4REF signal is used as trigger output.
19                 Additional modes (on TRGO2 only):
20                 - "OC5REF"    : OC5REF signal is used as trigger output.
21                 - "OC6REF"    : OC6REF signal is used as trigger output.
22                 - "compare_pulse_OC4REF":
23                   OC4REF rising or falling edges generate pulses.
24                 - "compare_pulse_OC6REF":
25                   OC6REF rising or falling edges generate pulses.
26                 - "compare_pulse_OC4REF_r_or_OC6REF_r":
27                   OC4REF or OC6REF rising edges generate pulses.
28                 - "compare_pulse_OC4REF_r_or_OC6REF_f":
29                   OC4REF rising or OC6REF falling edges generate pulses.
30                 - "compare_pulse_OC5REF_r_or_OC6REF_r":
31                   OC5REF or OC6REF rising edges generate pulses.
32                 - "compare_pulse_OC5REF_r_or_OC6REF_f":
33                   OC5REF rising or OC6REF falling edges generate pulses.
34
35                 +-----------+   +-------------+            +---------+
36                 | Prescaler +-> | Counter     |        +-> | Master  | TRGO(2)
37                 +-----------+   +--+--------+-+        |-> | Control +-->
38                                    |        |          ||  +---------+
39                                 +--v--------+-+ OCxREF ||  +---------+
40                                 | Chx compare +----------> | Output  | ChX
41                                 +-----------+-+         |  | Control +-->
42                                       .     |           |  +---------+
43                                       .     |           |    .
44                                 +-----------v-+ OC6REF  |    .
45                                 | Ch6 compare +---------+>
46                                 +-------------+
47
48                 Example with: "compare_pulse_OC4REF_r_or_OC6REF_r":
49
50                                 X
51                               X   X
52                             X .   . X
53                           X   .   .   X
54                         X     .   .     X
55                 count X .     .   .     . X
56                         .     .   .     .
57                         .     .   .     .
58                         +---------------+
59                 OC4REF  |     .   .     |
60                       +-+     .   .     +-+
61                         .     +---+     .
62                 OC6REF  .     |   |     .
63                       +-------+   +-------+
64                         +-+   +-+
65                 TRGO2   | |   | |
66                       +-+ +---+ +---------+
67
68 What:           /sys/bus/iio/devices/triggerX/master_mode
69 KernelVersion:  4.11
70 Contact:        benjamin.gaignard@st.com
71 Description:
72                 Reading returns the current master modes.
73                 Writing set the master mode
74
75 What:           /sys/bus/iio/devices/triggerX/sampling_frequency
76 KernelVersion:  4.11
77 Contact:        benjamin.gaignard@st.com
78 Description:
79                 Reading returns the current sampling frequency.
80                 Writing an value different of 0 set and start sampling.
81                 Writing 0 stop sampling.
82
83 What:           /sys/bus/iio/devices/iio:deviceX/in_count0_preset
84 KernelVersion:  4.12
85 Contact:        benjamin.gaignard@st.com
86 Description:
87                 Reading returns the current preset value.
88                 Writing sets the preset value.
89                 When counting up the counter starts from 0 and fires an
90                 event when reach preset value.
91                 When counting down the counter start from preset value
92                 and fire event when reach 0.
93
94 What:           /sys/bus/iio/devices/iio:deviceX/in_count_enable_mode_available
95 KernelVersion:  4.12
96 Contact:        benjamin.gaignard@st.com
97 Description:
98                 Reading returns the list possible enable modes.
99
100 What:           /sys/bus/iio/devices/iio:deviceX/in_count0_enable_mode
101 KernelVersion:  4.12
102 Contact:        benjamin.gaignard@st.com
103 Description:
104                 Configure the device counter enable modes, in all case
105                 counting direction is set by in_count0_count_direction
106                 attribute and the counter is clocked by the internal clock.
107                 always:
108                         Counter is always ON.
109
110                 gated:
111                         Counting is enabled when connected trigger signal
112                         level is high else counting is disabled.
113
114                 triggered:
115                         Counting is enabled on rising edge of the connected
116                         trigger, and remains enabled for the duration of this
117                         selected mode.
118
119 What:           /sys/bus/iio/devices/iio:deviceX/in_count_trigger_mode_available
120 KernelVersion:  4.13
121 Contact:        benjamin.gaignard@st.com
122 Description:
123                 Reading returns the list possible trigger modes.
124
125 What:           /sys/bus/iio/devices/iio:deviceX/in_count0_trigger_mode
126 KernelVersion:  4.13
127 Contact:        benjamin.gaignard@st.com
128 Description:
129                 Configure the device counter trigger mode
130                 counting direction is set by in_count0_count_direction
131                 attribute and the counter is clocked by the connected trigger
132                 rising edges.