summary refs log tree commit diff
path: root/Documentation
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2017-01-15 17:09:43 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-22 00:23:22 -0800
commit9e54924432783bfb21e905e0bf7042556bcb4b90 (patch)
tree7ddeb37703ff995a06ee4e77f3c429256a3320cc /Documentation
parent62481881401246859d9bd06b7c7b9a391c78892c (diff)
downloadlinux-9e54924432783bfb21e905e0bf7042556bcb4b90.tar.gz
Input: pwm-beeper - add optional amplifier regulator
This adds an optional regulator to the pwm-beeper device. This regulator
acts as an amplifier. The amplifier is only enabled while beeping in order
to reduce power consumption.

Tested on LEGO MINDSTORMS EV3, which has a speaker connected to PWM through
an amplifier.

Signed-off-by: David Lechner <david@lechnology.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/input/pwm-beeper.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt
index be332ae4f2d6..529408b4431a 100644
--- a/Documentation/devicetree/bindings/input/pwm-beeper.txt
+++ b/Documentation/devicetree/bindings/input/pwm-beeper.txt
@@ -5,3 +5,19 @@ Registers a PWM device as beeper.
 Required properties:
 - compatible: should be "pwm-beeper"
 - pwms: phandle to the physical PWM device
+
+Optional properties:
+- amp-supply: phandle to a regulator that acts as an amplifier for the beeper
+
+Example:
+
+beeper_amp: amplifier {
+	compatible = "fixed-regulator";
+	gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+};
+
+beeper {
+	compatible = "pwm-beeper";
+	pwms = <&pwm0>;
+	amp-supply = <&beeper_amp>;
+};