요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=========================================
The device for Mediatek MT6370 RGB LED
=========================================
Description
-----------
The MT6370 integrates a four-channel RGB LED driver, designed to provide a
variety of lighting effect for mobile device applications. The RGB LED devices
includes a smart LED string controller and it can drive 3 channels of LEDs with
a sink current up to 24mA and a CHG_VIN power good indicator LED with sink
current up to 6mA. It provides three operation modes for RGB LEDs:
PWM Dimming mode, breath pattern mode, and constant current mode. The device
can increase or decrease the brightness of the RGB LED via an I2C interface.
The breath pattern for a channel can be programmed using the "pattern" trigger,
using the hw_pattern attribute.
/sys/class/leds/<led>/hw_pattern
--------------------------------
Specify a hardware breath pattern for a MT6370 RGB LED.
The breath pattern is a series of timing pairs, with the hold-time expressed in
milliseconds. And the brightness is controlled by
'/sys/class/leds/<led>/brightness'. The pattern doesn't include the brightness
setting. Hardware pattern only controls the timing for each pattern stage
depending on the current brightness setting.
Pattern diagram::
"0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code
^
| ============
| / \ /
Icurr | / \ /
| / \ /
| / \ / .....repeat
| / \ /
| --- --- ---
|--- --- ---
+----------------------------------============------------> Time
< Tr1><Tr2>< Ton ><Tf1><Tf2 >< Toff >< Tr1><Tr2>
Timing description:
* Tr1: First rising time for 0% - 30% load.
* Tr2: Second rising time for 31% - 100% load.
* Ton: On time for 100% load.
* Tf1: First falling time for 100% - 31% load.
* Tf2: Second falling time for 30% to 0% load.
* Toff: Off time for 0% load.
* Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step.
* Toff: 250ms to 6250ms, 400ms per step.
Pattern example::
"0 125 0 125 0 125 0 125 0 625 0 1050"
This Will configure Tr1/Tr2/Tf1/Tf2 to 125m, Ton to 625ms, and Toff to 1050ms.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MT6370 RGB LED 개요
1-18MediaTek MT6370은 mobile device의 다양한 조명 효과를 위한 4-channel RGB LED driver를 통합합니다. Smart LED string controller는 최대 24mA sink current로 LED 세 채널을 구동하고, CHG_VIN power-good indicator LED는 최대 6mA를 sink합니다.
RGB LED는 PWM dimming, breath pattern, constant current의 세 동작 mode를 지원합니다. I2C interface를 통해 RGB LED brightness를 높이거나 낮출 수 있습니다.
각 채널의 breath pattern은 `pattern` trigger와 `hw_pattern` attribute로 program합니다.
RGB 세 채널과 indicator 채널의 current 한계입니다.
.. SPDX-License-Identifier: GPL-2.0
=========================================
The device for Mediatek MT6370 RGB LED
=========================================
Description
-----------
The MT6370 integrates a four-channel RGB LED driver, designed to provide a
variety of lighting effect for mobile device applications. The RGB LED devices
includes a smart LED string controller and it can drive 3 channels of LEDs with
a sink current up to 24mA and a CHG_VIN power good indicator LED with sink
current up to 6mA. It provides three operation modes for RGB LEDs:
PWM Dimming mode, breath pattern mode, and constant current mode. The device
can increase or decrease the brightness of the RGB LED via an I2C interface.
The breath pattern for a channel can be programmed using the "pattern" trigger,
Hardware breath pattern 파형
19-48`/sys/class/leds/<led>/hw_pattern`은 MT6370 RGB LED의 hardware breath timing을 지정합니다. Pattern은 brightness와 hold-time의 쌍이지만 여기서는 brightness code `0`을 dummy로 사용하며, 실제 brightness는 별도 `/sys/class/leds/<led>/brightness`가 결정합니다.
Hardware pattern은 현재 brightness 설정을 기준으로 각 stage의 시간만 제어합니다. 순서는 0~30% 상승 `Tr1`, 31~100% 상승 `Tr2`, 100% 유지 `Ton`, 100~31% 하강 `Tf1`, 30~0% 하강 `Tf2`, 0% 유지 `Toff`이며 이후 반복됩니다.
원문 ASCII 파형의 상승·유지·하강·꺼짐 cycle입니다.
using the hw_pattern attribute.
/sys/class/leds/<led>/hw_pattern
--------------------------------
Specify a hardware breath pattern for a MT6370 RGB LED.
The breath pattern is a series of timing pairs, with the hold-time expressed in
milliseconds. And the brightness is controlled by
'/sys/class/leds/<led>/brightness'. The pattern doesn't include the brightness
setting. Hardware pattern only controls the timing for each pattern stage
depending on the current brightness setting.
Pattern diagram::
"0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code
^
| ============
| / \ /
Icurr | / \ /
| / \ /
| / \ / .....repeat
| / \ /
| --- --- ---
|--- --- ---
+----------------------------------============------------> Time
< Tr1><Tr2>< Ton ><Tf1><Tf2 >< Toff >< Tr1><Tr2>
Timing description:
Timing 범위와 예제
49-64`Tr1`, `Tr2`, `Tf1`, `Tf2`, `Ton`은 125~3125ms 범위이며 200ms step을 사용합니다. `Toff`는 250~6250ms 범위이며 400ms step을 사용합니다.
예제 `0 125 0 125 0 125 0 125 0 625 0 1050`은 `Tr1`, `Tr2`, `Tf1`, `Tf2`를 125ms, `Ton`을 625ms, `Toff`를 1050ms로 구성합니다.
Brightness는 별도 attribute이며 pattern 값은 stage duration입니다.
* Tr1: First rising time for 0% - 30% load.
* Tr2: Second rising time for 31% - 100% load.
* Ton: On time for 100% load.
* Tf1: First falling time for 100% - 31% load.
* Tf2: Second falling time for 30% to 0% load.
* Toff: Off time for 0% load.
* Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step.
* Toff: 250ms to 6250ms, 400ms per step.
Pattern example::
"0 125 0 125 0 125 0 125 0 625 0 1050"
This Will configure Tr1/Tr2/Tf1/Tf2 to 125m, Ton to 625ms, and Toff to 1050ms.
요약·해설
leds-mt6370-rgb.rst:1-64MT6370은 실제 brightness와 breath timing을 서로 다른 sysfs attribute로 분리합니다.
Dummy brightness code 0을 포함한 여섯 timing pair의 순서와 범위를 파형 기준으로 정리했습니다.