forked from Minki/linux
9e54924432
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>
24 lines
467 B
Plaintext
24 lines
467 B
Plaintext
* PWM beeper device tree bindings
|
|
|
|
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>;
|
|
};
|