summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/input
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2019-04-29 23:56:09 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-04-30 00:11:25 -0700
commit13bda2d07791d0093728aed7698e76d2977e7639 (patch)
tree48d952ca70ac01fd0de74684d9de404b763005e1 /Documentation/devicetree/bindings/input
parent9a952206904de36cd11f3ca50b2fad01d789e25e (diff)
downloadlinux-13bda2d07791d0093728aed7698e76d2977e7639.tar.gz
Input: add a driver for GPIO controllable vibrators
Provide a simple driver for GPIO controllable vibrators. It will be used by the Fairphone 2. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Reviewed-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/gpio-vibrator.yaml37
1 files changed, 37 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/gpio-vibrator.yaml b/Documentation/devicetree/bindings/input/gpio-vibrator.yaml
new file mode 100644
index 000000000000..903475f52dbd
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/gpio-vibrator.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/input/gpio-vibrator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO vibrator
+
+maintainers:
+ - Luca Weiss <luca@z3ntu.xyz>
+
+description: |+
+ Registers a GPIO device as vibrator, where the on/off capability is controlled by a GPIO.
+
+properties:
+ compatible:
+ const: gpio-vibrator
+
+ enable-gpios:
+ maxItems: 1
+
+ vcc-supply:
+ description: Regulator that provides power
+
+required:
+ - compatible
+ - enable-gpios
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ vibrator {
+ compatible = "gpio-vibrator";
+ enable-gpios = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
+ vcc-supply = <&pm8941_l18>;
+ };