← Documents Documentation/devicetree/bindings/input/input-reset.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

SysRq Reset Sequence

지정 key 조합과 hold timeout으로 system을 sync/reset하는 바인딩입니다.

Source pathDocumentation/devicetree/bindings/input/input-reset.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

input-reset.txt:1-33

Chosen node의 global reset key sequence를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Input: sysrq reset sequence
2
3 A simple binding to represent a set of keys as described in
4 include/uapi/linux/input.h. This is to communicate a sequence of keys to the
5 sysrq driver. Upon holding the keys for a specified amount of time (if
6 specified) the system is sync'ed and reset.
7
8 Key sequences are global to the system but all the keys in a set must be coming
9 from the same input device.
10
11 The /chosen node should contain a 'linux,sysrq-reset-seq' child node to define
12 a set of keys.
13
14 Required property:
15 keyset: array of Linux keycodes, one keycode per cell.
16
17 Optional property:
18 timeout-ms: duration keys must be pressed together in milliseconds before
19 generating a sysrq. If omitted the system is rebooted immediately when a valid
20 sequence has been recognized.
21
22 Example:
23
24 chosen {
25 linux,sysrq-reset-seq {
26 keyset = <0x03
27 0x04
28 0x0a>;
29 timeout-ms = <3000>;
30 };
31 };
32
33 Would represent KEY_2, KEY_3 and KEY_9.
34

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

SysRq reset key sequence

1-21

이 binding은 `include/uapi/linux/input.h`에 정의된 key set을 나타내고 sysrq driver에 key sequence를 전달합니다. 지정한 시간 동안 모든 key를 누르면 system을 sync하고 reset하며, 시간을 지정하지 않을 수도 있습니다.

Key sequence는 system 전체에 적용되지만 한 set의 모든 key는 같은 input device에서 와야 합니다. `/chosen` node 아래에 `linux,sysrq-reset-seq` child를 두어 key set을 정의합니다. 필수 `keyset`은 cell마다 Linux keycode 하나를 담은 array입니다.

선택 `timeout-ms`는 sysrq를 생성하기 전에 key들을 함께 눌러야 하는 millisecond 단위 시간입니다. 생략하면 valid sequence를 인식하는 즉시 system을 reboot합니다.

SysRq reset sequence
One input deviceAll keyset codes pressed
timeout-msHold duration satisfied
SysRq driverSynchronize filesystems
ResetReboot system

같은 input device의 key set을 시간 조건과 함께 검증해 sync/reset합니다.

KEY_2+KEY_3+KEY_9 예제

22-33

예제는 `/chosen/linux,sysrq-reset-seq`에 keycode `0x03`, `0x04`, `0x0a`와 3000 ms timeout을 지정합니다. 이 조합은 `KEY_2`, `KEY_3`, `KEY_9`을 뜻합니다.

chosen {
               linux,sysrq-reset-seq {
                       keyset = <0x03
                                 0x04
                                 0x0a>;
                       timeout-ms = <3000>;
               };
        };