요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/thermal/loongson,ls2k-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Thermal sensors on Loongson-2 SoCs
maintainers:
- zhanghongchen <[email protected]>
- Yinbo Zhu <[email protected]>
allOf:
- $ref: /schemas/thermal/thermal-sensor.yaml#
properties:
compatible:
oneOf:
- enum:
- loongson,ls2k1000-thermal
- loongson,ls2k2000-thermal
- items:
- enum:
- loongson,ls2k0500-thermal
- const: loongson,ls2k1000-thermal
reg:
minItems: 1
maxItems: 2
interrupts:
maxItems: 1
'#thermal-sensor-cells':
const: 1
required:
- compatible
- reg
- interrupts
if:
properties:
compatible:
contains:
enum:
- loongson,ls2k2000-thermal
then:
properties:
reg:
minItems: 2
maxItems: 2
else:
properties:
reg:
maxItems: 1
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
thermal: thermal-sensor@1fe01500 {
compatible = "loongson,ls2k1000-thermal";
reg = <0x1fe01500 0x30>;
interrupt-parent = <&liointc0>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
#thermal-sensor-cells = <1>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Loongson-2 thermal sensors
1-15이 GPL-2.0-only 또는 BSD-2-Clause YAML 스키마는 Loongson-2 SoC의 thermal sensor를 정의하고 `/schemas/thermal/thermal-sensor.yaml#`을 포함합니다. Maintainer는 zhanghongchen과 Yinbo Zhu입니다.
Compatible, register, interrupt
16-36`compatible`은 `loongson,ls2k1000-thermal` 또는 `loongson,ls2k2000-thermal`을 단독으로 사용합니다. LS2K0500은 `loongson,ls2k0500-thermal` 뒤에 `loongson,ls2k1000-thermal` fallback을 둡니다. `reg`는 1~2개 범위, `interrupts`는 최대 한 항목이며 `#thermal-sensor-cells`는 channel specifier 하나를 받도록 1입니다.
필수 속성
37-41필수 속성은 `compatible`, `reg`, `interrupts`입니다.
LS2K2000 register 조건
42-61Compatible 목록에 `loongson,ls2k2000-thermal`이 들어 있으면 `reg`는 정확히 두 항목이어야 합니다. 그 밖의 LS2K1000·LS2K0500 계열은 `reg`를 최대 한 항목만 허용합니다. `unevaluatedProperties: false`로 추가 속성을 제한합니다.
LS2K1000 sensor 예제
62-71예제는 0x1fe01500의 0x30-byte register 범위, `liointc0` parent의 interrupt 7 level-low를 사용하고 1-cell thermal sensor provider로 노출합니다.
#include <dt-bindings/interrupt-controller/irq.h>
thermal: thermal-sensor@1fe01500 {
compatible = "loongson,ls2k1000-thermal";
reg = <0x1fe01500 0x30>;
interrupt-parent = <&liointc0>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
#thermal-sensor-cells = <1>;
};
요약과 해설
loongson,ls2k-thermal.yaml:1-71Loongson LS2K 계열의 channel sensor와 SoC별 register 개수 조건을 설명합니다. 접을 수 있는 영어 원문 전체는 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·register·interrupt·수치·예제 코드를 원형대로 유지합니다.