요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==========================
Regulator Driver Interface
==========================
The regulator driver interface is relatively simple and designed to allow
regulator drivers to register their services with the core framework.
Registration
============
Drivers can register a regulator by calling::
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
const struct regulator_config *config);
This will register the regulator's capabilities and operations to the regulator
core.
Regulators can be unregistered by calling::
void regulator_unregister(struct regulator_dev *rdev);
Regulator Events
================
Regulators can send events (e.g. overtemperature, undervoltage, etc) to
consumer drivers by calling::
int regulator_notifier_call_chain(struct regulator_dev *rdev,
unsigned long event, void *data);
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Provider driver interface
1-8Regulator driver interface는 비교적 단순하며 regulator driver가 자신의 service를 core framework에 등록하도록 설계됐습니다.
Driver가 capability와 operation을 core에 등록하면 consumer가 공통 API로 사용합니다.
==========================
Regulator Driver Interface
==========================
The regulator driver interface is relatively simple and designed to allow
regulator drivers to register their services with the core framework.
등록과 해제
9-24Driver는 `regulator_register(regulator_desc, config)`를 호출해 regulator를 등록하고 `struct regulator_dev *`를 받습니다. 이 호출은 regulator capability와 operation을 regulator core에 등록합니다.
Regulator를 해제하려면 `regulator_unregister(rdev)`를 호출합니다.
등록 결과 rdev를 해제 호출까지 유지합니다.
Registration
============
Drivers can register a regulator by calling::
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
const struct regulator_config *config);
This will register the regulator's capabilities and operations to the regulator
core.
Regulators can be unregistered by calling::
void regulator_unregister(struct regulator_dev *rdev);
Provider event 전파
25-32Regulator는 overtemperature, undervoltage 같은 event를 `regulator_notifier_call_chain(rdev, event, data)`로 consumer driver에 보낼 수 있습니다.
Regulator 상태 이상을 core notifier chain을 통해 consumer에 전달합니다.
Regulator Events
================
Regulators can send events (e.g. overtemperature, undervoltage, etc) to
consumer drivers by calling::
int regulator_notifier_call_chain(struct regulator_dev *rdev,
unsigned long event, void *data);
요약·해설
regulator.rst:1-32Regulator provider가 capability와 operation을 core에 등록하고 event를 consumer로 전파하는 API를 설명합니다.