bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-0923-dt-bindings-input-Add-bindings-for-raspberrypi-butto.patch
1 From 07419175fdb507be2c9d3aaf4b7d18306a336348 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 2 Aug 2023 11:38:03 +0100
4 Subject: [PATCH] dt-bindings: input: Add bindings for raspberrypi-button
5
6 Add bindings for the firmware-based button driver.
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
9 ---
10 .../input/raspberrypi,firmware-button.yaml | 47 +++++++++++++++++++
11 1 file changed, 47 insertions(+)
12 create mode 100644 Documentation/devicetree/bindings/input/raspberrypi,firmware-button.yaml
13
14 --- /dev/null
15 +++ b/Documentation/devicetree/bindings/input/raspberrypi,firmware-button.yaml
16 @@ -0,0 +1,47 @@
17 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
18 +%YAML 1.2
19 +---
20 +$id: http://devicetree.org/schemas/input/raspberrypi,firmware-button.yaml#
21 +$schema: http://devicetree.org/meta-schemas/core.yaml#
22 +
23 +title: Raspberry Pi firmware buttons
24 +
25 +maintainers:
26 + - Phil Elwell <phil@raspberrypi.com>
27 +
28 +description: >
29 + The Raspberry Pi 5 firmware exposes the state of the power button. The
30 + raspberrypi-button driver generates a keycode when it is pressed.
31 +
32 +properties:
33 + compatible:
34 + enum:
35 + - raspberrypi,firmware-button
36 +
37 + id:
38 + description: A numeric identifier of the button
39 +
40 + label:
41 + description: Descriptive name of the button.
42 +
43 + linux,code:
44 + description: Key code to emit.
45 +
46 +required:
47 + - compatible
48 + - linux,code
49 +
50 +additionalProperties: false
51 +
52 +examples:
53 + - |
54 + #include <dt-bindings/input/raspberrypi-button.h>
55 +
56 + pwr_button: pwr_button {
57 + compatible = "raspberrypi,firmware-button";
58 + id = <RASPBERRYPI_BUTTON_POWER>;
59 + label = "pwr_button";
60 + linux,code = <116>; // KEY_POWER
61 + };
62 +
63 +...