Skip to content

Commit c55d84f

Browse files
MrVandtor
authored andcommitted
dt-bindings: input: pwm-beeper: convert to dt schema
Convert the binding doc to dt schema, and also fixed the example from fixed-regulator to regulator-fixed. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent cf59501 commit c55d84f

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

Documentation/devicetree/bindings/input/pwm-beeper.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/pwm-beeper.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: PWM beeper
8+
9+
maintainers:
10+
- Sascha Hauer <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: pwm-beeper
15+
16+
pwms:
17+
maxItems: 1
18+
19+
amp-supply:
20+
description: an amplifier for the beeper
21+
22+
beeper-hz:
23+
description: bell frequency in Hz
24+
minimum: 10
25+
maximum: 10000
26+
27+
required:
28+
- compatible
29+
- pwms
30+
31+
unevaluatedProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/gpio/gpio.h>
36+
beeper {
37+
compatible = "pwm-beeper";
38+
pwms = <&pwm0>;
39+
amp-supply = <&beeper_amp>;
40+
beeper-hz = <1000>;
41+
};

0 commit comments

Comments
 (0)