요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Legacy /dev/rtc와 RTC class compatibility
rtc-cdev:44-50새 RTC class는 old /dev/rtc ioctls를 지원하지만 chip·system 비표준성 때문에 일부 PC/AT 기능이 없을 수 있고, ACPI 등 새 기능은 old driver가 지원할 수 없습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /dev/rtcX
Date: April 2005
KernelVersion: 2.6.12
Contact: linux-rtc@vger.kernel.org
Description:
The ioctl interface to drivers for real-time clocks (RTCs).
Following actions are supported:
* RTC_RD_TIME, RTC_SET_TIME: Read or set the RTC time. Time
format is a Gregorian calendar date and 24 hour wall clock
time.
* RTC_AIE_ON, RTC_AIE_OFF: Enable or disable the alarm interrupt
for RTCs that support alarms
* RTC_ALM_READ, RTC_ALM_SET: Read or set the alarm time for
RTCs that support alarms. Can be set upto 24 hours in the
future. Requires a separate RTC_AIE_ON call to enable the
alarm interrupt. (Prefer to use RTC_WKALM_*)
* RTC_WKALM_RD, RTC_WKALM_SET: For RTCs that support a more
powerful interface, which can issue alarms beyond 24 hours and
enable IRQs in the same request.
* RTC_PIE_ON, RTC_PIE_OFF: Enable or disable the periodic
interrupt for RTCs that support periodic interrupts.
* RTC_UIE_ON, RTC_UIE_OFF: Enable or disable the update
interrupt for RTCs that support it.
* RTC_IRQP_READ, RTC_IRQP_SET: Read or set the frequency for
periodic interrupts for RTCs that support periodic interrupts.
Requires a separate RTC_PIE_ON call to enable the periodic
interrupts.
* RTC_VL_READ: Read the voltage inputs status of the RTC when
supported. The value is a bit field of RTC_VL_*, giving the
status of the main and backup voltages.
* RTC_VL_CLEAR: Clear the voltage status of the RTC. Some RTCs
need user interaction when the backup power provider is
replaced or charged to be able to clear the status.
The ioctl() calls supported by the older /dev/rtc interface are
also supported by the newer RTC class framework. However,
because the chips and systems are not standardized, some PC/AT
functionality might not be provided. And in the same way, some
newer features -- including those enabled by ACPI -- are exposed
by the RTC class framework, but can't be supported by the older
driver.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
/dev/rtcX ioctl actions
1-42| 항목 | 내용 |
|---|---|
| What | /dev/rtcX |
| Date | 2005년 4월 |
| KernelVersion | 2.6.12 |
| Contact | linux-rtc@vger.kernel.org |
| Description | Real-time clock(RTC) driver를 위한 ioctl interface입니다. |
| Ioctl | 전문 번역 |
|---|---|
| RTC_RD_TIME, RTC_SET_TIME | RTC time을 읽거나 설정합니다. Time format은 Gregorian calendar date와 24-hour wall-clock time입니다. |
| RTC_AIE_ON, RTC_AIE_OFF | Alarm을 지원하는 RTC에서 alarm interrupt를 활성화하거나 비활성화합니다. |
| RTC_ALM_READ, RTC_ALM_SET | Alarm을 지원하는 RTC의 alarm time을 읽거나 설정합니다. 최대 24시간 뒤까지 설정할 수 있습니다. Alarm interrupt를 활성화하려면 별도의 RTC_AIE_ON call이 필요합니다. RTC_WKALM_* 사용을 권장합니다. |
| RTC_WKALM_RD, RTC_WKALM_SET | 더 강력한 interface를 지원하는 RTC에서 사용합니다. 24시간을 넘는 alarm을 만들고 같은 request에서 IRQ를 활성화할 수 있습니다. |
| RTC_PIE_ON, RTC_PIE_OFF | Periodic interrupt를 지원하는 RTC에서 periodic interrupt를 활성화하거나 비활성화합니다. |
| RTC_UIE_ON, RTC_UIE_OFF | Update interrupt를 지원하는 RTC에서 이를 활성화하거나 비활성화합니다. |
| RTC_IRQP_READ, RTC_IRQP_SET | Periodic interrupt를 지원하는 RTC에서 그 frequency를 읽거나 설정합니다. Periodic interrupt를 활성화하려면 별도의 RTC_PIE_ON call이 필요합니다. |
| RTC_VL_READ | 지원되는 경우 RTC의 voltage input status를 읽습니다. 값은 RTC_VL_* bit field이며 main·backup voltage의 status를 제공합니다. |
| RTC_VL_CLEAR | RTC voltage status를 지웁니다. 일부 RTC에서는 backup power provider를 교체하거나 충전한 뒤 status를 지울 수 있도록 user interaction이 필요합니다. |
Old RTC interface와 class framework
44-50이전 /dev/rtc interface가 지원하는 ioctl() call은 새 RTC class framework도 지원합니다. 그러나 chip과 system이 표준화되어 있지 않아 일부 PC/AT functionality를 제공하지 않을 수 있습니다.
마찬가지로 ACPI로 활성화되는 기능을 포함한 일부 새 feature는 RTC class framework가 노출하지만 이전 driver는 지원할 수 없습니다.
Legacy alarm·periodic interface는 value 설정과 IRQ enable을 분리하고 wake-alarm interface는 더 긴 범위와 IRQ enable을 결합한다.
Time·alarm·interrupt·voltage ioctls
rtc-cdev:1-42/dev/rtcX는 Gregorian·24-hour time, alarm과 IRQ, periodic·update interrupt, periodic frequency, main·backup voltage status를 제어합니다. WKALM은 24시간을 넘어 IRQ enable까지 한 request로 처리합니다.