Skip to content

Commit e21a77d

Browse files
Marek Vasutrobherring
authored andcommitted
dt-bindings: watchdog: gpio: Convert bindings to YAML
Convert the gpio-wdt bindings from text to YAML ones, to permit DT validation. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] [robh: add missing 'always-running'] Signed-off-by: Rob Herring <[email protected]>
1 parent 1a2cead commit e21a77d

File tree

2 files changed

+55
-28
lines changed

2 files changed

+55
-28
lines changed

Documentation/devicetree/bindings/watchdog/gpio-wdt.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/watchdog/linux,wdt-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GPIO-controlled Watchdog
8+
9+
maintainers:
10+
- Guenter Roeck <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: linux,wdt-gpio
15+
16+
gpios:
17+
description: gpio connection to WDT reset pin
18+
maxItems: 1
19+
20+
hw_algo:
21+
description: The algorithm used by the driver.
22+
enum: [ level, toggle ]
23+
24+
hw_margin_ms:
25+
description: Maximum time to reset watchdog circuit (milliseconds).
26+
$ref: /schemas/types.yaml#/definitions/uint32
27+
28+
always-running:
29+
type: boolean
30+
description:
31+
If the watchdog timer cannot be disabled, add this flag to have the driver
32+
keep toggling the signal without a client.
33+
It will only cease to toggle the signal when the device is open and the
34+
timeout elapsed.
35+
36+
required:
37+
- compatible
38+
- gpios
39+
- hw_algo
40+
- hw_margin_ms
41+
42+
allOf:
43+
- $ref: watchdog.yaml#
44+
45+
additionalProperties: false
46+
47+
examples:
48+
- |
49+
#include <dt-bindings/gpio/gpio.h>
50+
watchdog {
51+
compatible = "linux,wdt-gpio";
52+
gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
53+
hw_algo = "toggle";
54+
hw_margin_ms = <1600>;
55+
};

0 commit comments

Comments
 (0)