mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-28 21:46:02 -04:00
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>
This commit is contained in:
committed by
Dmitry Torokhov
parent
6248188140
commit
9e54924432
@@ -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>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user