aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/input
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>2017-09-04 12:30:03 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-09-04 15:13:24 -0400
commit3e5b08518f6aefad31dca975634c3133457928ff (patch)
tree7b81f87a03f735cb096dea772d390087b4b7dad7 /Documentation/devicetree/bindings/input
parent1bf21b3373df2b5bfa3c6d2dcd52344c7ee4cc58 (diff)
Input: add a driver for PWM controllable vibrators
Provide a simple driver for PWM controllable vibrators. It will be used by Motorola Droid 4. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation/devicetree/bindings/input')
-rw-r--r--Documentation/devicetree/bindings/input/pwm-vibrator.txt66
1 files changed, 66 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/pwm-vibrator.txt b/Documentation/devicetree/bindings/input/pwm-vibrator.txt
new file mode 100644
index 000000000000..09145d18491d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/pwm-vibrator.txt
@@ -0,0 +1,66 @@
1* PWM vibrator device tree bindings
2
3Registers a PWM device as vibrator. It is expected, that the vibrator's
4strength increases based on the duty cycle of the enable PWM channel
5(100% duty cycle meaning strongest vibration, 0% meaning no vibration).
6
7The binding supports an optional direction PWM channel, that can be
8driven at fixed duty cycle. If available this is can be used to increase
9the vibration effect of some devices.
10
11Required properties:
12- compatible: should contain "pwm-vibrator"
13- pwm-names: Should contain "enable" and optionally "direction"
14- pwms: Should contain a PWM handle for each entry in pwm-names
15
16Optional properties:
17- vcc-supply: Phandle for the regulator supplying power
18- direction-duty-cycle-ns: Duty cycle of the direction PWM channel in
19 nanoseconds, defaults to 50% of the channel's
20 period.
21
22Example from Motorola Droid 4:
23
24&omap4_pmx_core {
25 vibrator_direction_pin: pinmux_vibrator_direction_pin {
26 pinctrl-single,pins = <
27 OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1) /* dmtimer8_pwm_evt (gpio_27) */
28 >;
29 };
30
31 vibrator_enable_pin: pinmux_vibrator_enable_pin {
32 pinctrl-single,pins = <
33 OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1) /* dmtimer9_pwm_evt (gpio_28) */
34 >;
35 };
36};
37
38/ {
39 pwm8: dmtimer-pwm {
40 pinctrl-names = "default";
41 pinctrl-0 = <&vibrator_direction_pin>;
42
43 compatible = "ti,omap-dmtimer-pwm";
44 #pwm-cells = <3>;
45 ti,timers = <&timer8>;
46 ti,clock-source = <0x01>;
47 };
48
49 pwm9: dmtimer-pwm {
50 pinctrl-names = "default";
51 pinctrl-0 = <&vibrator_enable_pin>;
52
53 compatible = "ti,omap-dmtimer-pwm";
54 #pwm-cells = <3>;
55 ti,timers = <&timer9>;
56 ti,clock-source = <0x01>;
57 };
58
59 vibrator {
60 compatible = "pwm-vibrator";
61 pwms = <&pwm8 0 1000000000 0>,
62 <&pwm9 0 1000000000 0>;
63 pwm-names = "enable", "direction";
64 direction-duty-cycle-ns = <1000000000>;
65 };
66};