← Documents Documentation/leds/leds-st1202.rst GitHub 원문 ↗

Linux 6.18.37 · LEDs

STMicroelectronics LED1202 Driver

12-channel LED1202의 pattern memory, duration, 공통 repeat 규칙입니다.

Source pathDocumentation/leds/leds-st1202.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

leds-st1202.rst:1-34

LED1202는 최대 8개 pattern과 pattern당 8개 tuple을 저장하며 repeat 값 255는 무한 반복입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ============================================
4 Kernel driver for STMicroelectronics LED1202
5 ============================================
6
7 /sys/class/leds/<led>/hw_pattern
8 --------------------------------
9
10 Specify a hardware pattern for the ST1202 LED. The LED controller
11 implements 12 low-side current generators with independent dimming
12 control. Internal volatile memory allows the user to store up to 8
13 different patterns. Each pattern is a particular output configuration
14 in terms of PWM duty-cycle and duration (ms).
15
16 To be compatible with the hardware pattern format, maximum 8 tuples of
17 brightness (PWM) and duration must be written to hw_pattern.
18
19 - Min pattern duration: 22 ms
20 - Max pattern duration: 5660 ms
21
22 The format of the hardware pattern values should be:
23 "brightness duration brightness duration ..."
24
25 /sys/class/leds/<led>/repeat
26 ----------------------------
27
28 Specify a pattern repeat number, which is common for all channels.
29 Default is 1; negative numbers and 0 are invalid.
30
31 This file will always return the originally written repeat number.
32
33 When the 255 value is written to it, all patterns will repeat
34 indefinitely.
35

3. 한국어 전문 번역

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

LED1202 pattern memory

1-22

STMicroelectronics LED1202 controller는 독립 dimming 제어가 가능한 12개 low-side current generator를 구현합니다. 내부 volatile memory에는 서로 다른 pattern을 최대 8개 저장할 수 있습니다.

각 pattern은 PWM duty-cycle을 뜻하는 brightness와 duration(ms)의 output configuration입니다. 표준 hardware pattern 형식에 맞춰 `hw_pattern`에는 brightness·duration tuple을 최대 8개까지 씁니다.

Pattern duration은 최소 22ms, 최대 5660ms이며 형식은 `brightness duration brightness duration ...`입니다.

LED1202 pattern 한계
항목
Current generator12개, 독립 dimming
저장 pattern최대 8개
Pattern당 tuple최대 8개
Duration22~5660ms

Pattern memory와 tuple 제약입니다.

.. SPDX-License-Identifier: GPL-2.0

============================================
Kernel driver for STMicroelectronics LED1202
============================================

/sys/class/leds/<led>/hw_pattern
--------------------------------

Specify a hardware pattern for the ST1202 LED. The LED controller
implements 12 low-side current generators with independent dimming
control. Internal volatile memory allows the user to store up to 8
different patterns. Each pattern is a particular output configuration
in terms of PWM duty-cycle and duration (ms).

To be compatible with the hardware pattern format, maximum 8 tuples of
brightness (PWM) and duration must be written to hw_pattern.

- Min pattern duration: 22 ms
- Max pattern duration: 5660 ms

The format of the hardware pattern values should be:

공통 repeat attribute

23-34

`/sys/class/leds/<led>/repeat`는 모든 channel에 공통인 pattern 반복 횟수를 지정합니다. 기본값은 1이고 음수와 0은 유효하지 않습니다.

이 file은 hardware 내부에서 처리된 값이 아니라 userspace가 원래 쓴 repeat number를 항상 돌려줍니다. 값 `255`를 쓰면 모든 pattern이 무한 반복됩니다.

LED1202 repeat 선택
기본 `repeat = 1`양의 일반 값: 지정 횟수만큼 반복`255`: 무한 반복음수 또는 `0`: invalid

모든 channel에 같은 반복 정책을 적용합니다.

"brightness duration brightness duration ..."

/sys/class/leds/<led>/repeat
----------------------------

Specify a pattern repeat number, which is common for all channels.
Default is 1; negative numbers and 0 are invalid.

This file will always return the originally written repeat number.

When the 255 value is written to it, all patterns will repeat
indefinitely.