treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / st,stm32-lptimer.yaml
blob1a4cc5f3fb33f8f20653e8e12941a4f76ae605f8
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Low-Power Timers bindings
9 description: |
10   The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
11   functions
12    - PWM output (with programmable prescaler, configurable polarity)
13    - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
14    - Several counter modes:
15      - quadrature encoder to detect angular position and direction of rotary
16        elements, from IN1 and IN2 input signals.
17      - simple counter from IN1 input signal.
19 maintainers:
20   - Fabrice Gasnier <fabrice.gasnier@st.com>
22 properties:
23   compatible:
24     const: st,stm32-lptimer
26   reg:
27     maxItems: 1
29   clocks:
30     maxItems: 1
32   clock-names:
33     items:
34       - const: mux
36   "#address-cells":
37     const: 1
39   "#size-cells":
40     const: 0
42   pwm:
43     type: object
45     properties:
46       compatible:
47         const: st,stm32-pwm-lp
49       "#pwm-cells":
50         const: 3
52     required:
53       - "#pwm-cells"
54       - compatible
56 patternProperties:
57   "^trigger@[0-9]+$":
58     type: object
60     properties:
61       compatible:
62         const: st,stm32-lptimer-trigger
64       reg:
65         description: Identify trigger hardware block.
66         items:
67          minimum: 0
68          maximum: 2
70     required:
71       - compatible
72       - reg
74   counter:
75     type: object
77     properties:
78       compatible:
79         const: st,stm32-lptimer-counter
81     required:
82       - compatible
84 required:
85   - "#address-cells"
86   - "#size-cells"
87   - compatible
88   - reg
89   - clocks
90   - clock-names
92 additionalProperties: false
94 examples:
95   - |
96     #include <dt-bindings/clock/stm32mp1-clks.h>
97     timer@40002400 {
98       compatible = "st,stm32-lptimer";
99       reg = <0x40002400 0x400>;
100       clocks = <&timer_clk>;
101       clock-names = "mux";
102       #address-cells = <1>;
103       #size-cells = <0>;
105       pwm {
106         compatible = "st,stm32-pwm-lp";
107         #pwm-cells = <3>;
108       };
110       trigger@0 {
111         compatible = "st,stm32-lptimer-trigger";
112         reg = <0>;
113       };
115       counter {
116         compatible = "st,stm32-lptimer-counter";
117       };
118     };