요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/watchdog/linux,wdt-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO-controlled Watchdog
maintainers:
- Guenter Roeck <[email protected]>
- Robert Marko <[email protected]>
properties:
compatible:
const: linux,wdt-gpio
gpios:
description: gpio connection to WDT reset pin
maxItems: 1
hw_algo:
description: The algorithm used by the driver.
oneOf:
- description:
Either a high-to-low or a low-to-high transition clears the WDT counter.
The watchdog timer is disabled when GPIO is left floating or connected
to a three-state buffer.
const: toggle
- description:
Low or high level starts counting WDT timeout, the opposite level
disables the WDT.
Active level is determined by the GPIO flags.
const: level
hw_margin_ms:
description: Maximum time to reset watchdog circuit (milliseconds).
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 2
maximum: 65535
always-running:
type: boolean
description:
If the watchdog timer cannot be disabled, add this flag to have the driver
keep toggling the signal without a client.
It will only cease to toggle the signal when the device is open and the
timeout elapsed.
required:
- compatible
- gpios
- hw_algo
- hw_margin_ms
allOf:
- $ref: watchdog.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
hw_algo = "toggle";
hw_margin_ms = <1600>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
GPIO 제어 워치독
1-12GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 스키마는 GPIO로 제어하는 워치독을 정의합니다. 관리자는 Guenter Roeck과 Robert Marko입니다.
toggle·level 알고리즘
13-34`compatible`은 `linux,wdt-gpio`이고 `gpios`는 WDT reset pin에 연결된 GPIO 하나를 가리킵니다. `hw_algo`는 driver가 사용할 알고리즘입니다.
`toggle`은 high-to-low 또는 low-to-high transition으로 WDT counter를 clear합니다. GPIO를 floating 상태로 두거나 three-state buffer에 연결하면 watchdog timer가 비활성화됩니다. `level`은 low 또는 high active level에서 WDT timeout counting을 시작하고 반대 level에서 비활성화하며, active level은 GPIO flag로 정합니다.
properties:
compatible:
const: linux,wdt-gpio
gpios:
description: gpio connection to WDT reset pin
maxItems: 1
hw_algo:
description: The algorithm used by the driver.
oneOf:
- description:
Either a high-to-low or a low-to-high transition clears the WDT counter.
The watchdog timer is disabled when GPIO is left floating or connected
to a three-state buffer.
const: toggle
- description:
Low or high level starts counting WDT timeout, the opposite level
disables the WDT.
Active level is determined by the GPIO flags.
const: level
reset 간격과 always-running
35-59`hw_margin_ms`는 watchdog circuit을 reset할 수 있는 최대 간격을 millisecond로 지정하며 범위는 2~65535입니다.
watchdog timer를 비활성화할 수 없다면 `always-running` flag를 추가해 client가 없어도 driver가 신호를 계속 toggle하게 합니다. device가 open된 상태에서 timeout이 지난 경우에만 toggle을 멈춥니다.
`compatible`, `gpios`, `hw_algo`, `hw_margin_ms`가 필수이고 공통 `watchdog.yaml`을 상속합니다. 평가되지 않은 추가 속성은 허용하지 않습니다.
hw_margin_ms:
description: Maximum time to reset watchdog circuit (milliseconds).
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 2
maximum: 65535
always-running:
type: boolean
description:
If the watchdog timer cannot be disabled, add this flag to have the driver
keep toggling the signal without a client.
It will only cease to toggle the signal when the device is open and the
timeout elapsed.
required:
- compatible
- gpios
- hw_algo
- hw_margin_ms
allOf:
- $ref: watchdog.yaml#
unevaluatedProperties: false
active-low toggle 예제
60-68예제는 GPIO3의 9번 active-low pin을 사용하고 `toggle` 알고리즘과 1600ms hardware margin을 지정합니다.
examples:
- |
#include <dt-bindings/gpio/gpio.h>
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
hw_algo = "toggle";
hw_margin_ms = <1600>;
};
요약과 해설
linux,wdt-gpio.yaml:1-68GPIO 워치독의 toggle·level 알고리즘, margin과 always-running 동작을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, GPIO, 예제와 원문 줄 좌표를 원형대로 보존합니다.