Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <robh@kernel.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221107160338.27910-1-marex@denx.de
[robh: add missing 'always-running']
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Marek Vasut and committed by
Rob Herring
e21a77d8 1a2cead1

+55 -28
-28
Documentation/devicetree/bindings/watchdog/gpio-wdt.txt
··· 1 - * GPIO-controlled Watchdog 2 - 3 - Required Properties: 4 - - compatible: Should contain "linux,wdt-gpio". 5 - - gpios: From common gpio binding; gpio connection to WDT reset pin. 6 - - hw_algo: The algorithm used by the driver. Should be one of the 7 - following values: 8 - - toggle: Either a high-to-low or a low-to-high transition clears 9 - the WDT counter. The watchdog timer is disabled when GPIO is 10 - left floating or connected to a three-state buffer. 11 - - level: Low or high level starts counting WDT timeout, 12 - the opposite level disables the WDT. Active level is determined 13 - by the GPIO flags. 14 - - hw_margin_ms: Maximum time to reset watchdog circuit (milliseconds). 15 - 16 - Optional Properties: 17 - - always-running: If the watchdog timer cannot be disabled, add this flag to 18 - have the driver keep toggling the signal without a client. It will only cease 19 - to toggle the signal when the device is open and the timeout elapsed. 20 - 21 - Example: 22 - watchdog: watchdog { 23 - /* ADM706 */ 24 - compatible = "linux,wdt-gpio"; 25 - gpios = <&gpio3 9 GPIO_ACTIVE_LOW>; 26 - hw_algo = "toggle"; 27 - hw_margin_ms = <1600>; 28 - };
+55
Documentation/devicetree/bindings/watchdog/linux,wdt-gpio.yaml
··· 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 <linux@roeck-us.net> 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 + };