요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Texas Instruments - lm3532 White LED driver with ambient light sensing
capability.
The LM3532 provides the 3 high-voltage, low-side current sinks. The device is
programmable over an I2C-compatible interface and has independent
current control for all three channels. The adaptive current regulation
method allows for different LED currents in each current sink thus allowing
for a wide variety of backlight and keypad applications.
The main features of the LM3532 include dual ambient light sensor inputs
each with 32 internal voltage setting resistors, 8-bit logarithmic and linear
brightness control, dual external PWM brightness control inputs, and up to
1000:1 dimming ratio with programmable fade in and fade out settings.
Required properties:
- compatible : "ti,lm3532"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0
Optional properties:
- enable-gpios : gpio pin to enable (active high)/disable the device.
- ramp-up-us - The Run time ramp rates/step are from one current
set-point to another after the device has reached its
initial target set point from turn-on
- ramp-down-us - The Run time ramp rates/step are from one current
set-point to another after the device has reached its
initial target set point from turn-on
Range for ramp settings: 8us - 65536us
Optional properties if ALS mode is used:
- ti,als-vmin - Minimum ALS voltage defined in Volts
- ti,als-vmax - Maximum ALS voltage defined in Volts
Per the data sheet the max ALS voltage is 2V and the min is 0V
- ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms
- ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms
Range for impedance select: 37000 Ohms - 1190 Ohms
Values above 37kohms will be set to the "High Impedance" setting
- ti,als-avrg-time-us - Determines the length of time the device needs to
average the two ALS inputs. This is only used if
the input mode is LM3532_ALS_INPUT_AVRG.
Range: 17920us - 2293760us
- ti,als-input-mode - Determines how the device uses the attached ALS
devices.
0x00 - ALS1 and ALS2 input average
0x01 - ALS1 Input
0x02 - ALS2 Input
0x03 - Max of ALS1 and ALS2
Required child properties:
- reg : Indicates control bank the LED string is controlled by
- led-sources : see Documentation/devicetree/bindings/leds/common.txt
- ti,led-mode : Defines if the LED strings are manually controlled or
if the LED strings are controlled by the ALS.
0x00 - LED strings are I2C controlled via full scale
brightness control register
0x01 - LED strings are ALS controlled
Optional LED child properties:
- label : see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger :
see Documentation/devicetree/bindings/leds/common.txt
- led-max-microamp : Defines the full scale current value for each control
bank. The range is from 5000uA-29800uA in increments
of 800uA.
Example:
led-controller@38 {
compatible = "ti,lm3532";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x38>;
enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
ramp-up-us = <1024>;
ramp-down-us = <65536>;
ti,als-vmin = <0>;
ti,als-vmax = <2000>;
ti,als1-imp-sel = <4110>;
ti,als2-imp-sel = <2180>;
ti,als-avrg-time-us = <17920>;
ti,als-input-mode = <0x00>;
led@0 {
reg = <0>;
led-sources = <2>;
ti,led-mode = <1>;
led-max-microamp = <21800>;
label = ":backlight";
linux,default-trigger = "backlight";
};
led@1 {
reg = <1>;
led-sources = <1>;
ti,led-mode = <0>;
label = ":kbd_backlight";
};
};
For more product information please see the links below:
https://www.ti.com/product/LM3532
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
LM3532 core와 ramp 속성
1-30TI LM3532는 ambient light sensing 기능을 갖춘 white LED driver입니다. 세 개의 high-voltage low-side current sink를 제공하고 I2C 호환 interface로 프로그래밍하며 세 channel의 전류를 독립 제어합니다. Adaptive current regulation으로 sink마다 다른 LED 전류를 사용할 수 있어 백라이트와 키패드에 폭넓게 적용할 수 있습니다.
주요 기능은 각각 내부 voltage-setting resistor 32개를 가진 두 ALS 입력, 8-bit logarithmic 및 linear 밝기 제어, 외부 PWM 밝기 입력 두 개, programmable fade-in/fade-out을 포함한 최대 1000:1 dimming ratio입니다.
필수 `compatible`은 `ti,lm3532`, `reg`는 I2C slave 주소이며 `#address-cells`는 1, `#size-cells`는 0입니다. 선택 `enable-gpios`는 active-high enable 및 disable 핀입니다. `ramp-up-us`와 `ramp-down-us`는 turn-on 후 초기 목표 set point에 도달한 뒤 한 current set-point에서 다른 값으로 이동하는 run-time ramp rate/step이며 범위는 8~65536us입니다.
세 LED bank와 두 ALS 입력을 중심으로 기능을 정리합니다.
LM3532 ALS mode
31-51ALS mode에서 선택 `ti,als-vmin`과 `ti,als-vmax`는 volt 단위 최소·최대 ALS 전압입니다. Datasheet 범위는 최소 0V, 최대 2V입니다. `ti,als1-imp-sel`과 `ti,als2-imp-sel`은 ohm 단위 ALS1·ALS2 impedance resistor 선택이며 범위는 1190~37000 Ohm입니다. 37kOhm보다 큰 값은 `High Impedance` 설정이 됩니다.
`ti,als-avrg-time-us`는 두 ALS 입력을 평균하는 시간이고 `LM3532_ALS_INPUT_AVRG` mode에서만 사용하며 범위는 17920~2293760us입니다. `ti,als-input-mode`의 `0x00`은 ALS1·ALS2 평균, `0x01`은 ALS1, `0x02`는 ALS2, `0x03`은 두 입력 중 최댓값을 사용합니다.
LM3532 LED control bank
52-68필수 child `reg`는 LED string을 제어하는 control bank를 나타내고 `led-sources`는 공통 LED 바인딩을 따릅니다. `ti,led-mode`의 `0x00`은 full-scale brightness control register를 통한 I2C 수동 제어, `0x01`은 ALS 제어입니다.
선택 `label`과 `linux,default-trigger`는 공통 LED 바인딩을 따릅니다. `led-max-microamp`는 control bank별 full-scale current이며 5000~29800uA 범위를 800uA 단위로 설정합니다.
LM3532 ALS와 두 bank 예제
69-105예제는 주소 `0x38`에서 active-high enable, ramp-up 1024us, ramp-down 65536us를 사용합니다. ALS 범위는 0~2000mV이고 impedance는 4110 및 2180 Ohm, 평균 시간은 17920us이며 두 ALS 입력 평균 mode를 선택합니다.
Bank 0은 source 2를 ALS mode로 제어하고 full-scale current 21800uA와 backlight trigger를 사용합니다. Bank 1은 source 1을 I2C 수동 mode로 제어하여 keyboard backlight로 표시합니다.
led-controller@38 {
compatible = "ti,lm3532";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x38>;
enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
ramp-up-us = <1024>;
ramp-down-us = <65536>;
ti,als-vmin = <0>;
ti,als-vmax = <2000>;
ti,als1-imp-sel = <4110>;
ti,als2-imp-sel = <2180>;
ti,als-avrg-time-us = <17920>;
ti,als-input-mode = <0x00>;
led@0 {
reg = <0>;
led-sources = <2>;
ti,led-mode = <1>;
led-max-microamp = <21800>;
label = ":backlight";
linux,default-trigger = "backlight";
};
led@1 {
reg = <1>;
led-sources = <1>;
ti,led-mode = <0>;
label = ":kbd_backlight";
};
};
요약과 해설
leds-lm3532.txt:1-105Ramp, ALS mode, full-scale current와 예제를 설명합니다.