|
|
#define | I2C_RTC_ORDER_sec_min_hour_wkday_day_month_year { .sec = 0, .min = 1, .hour = 2, .day = 4, .wkday = 3, .month = 5, .year = 6 } |
|
#define | I2C_RTC_ORDER_sec_min_hour_day_wkday_month_year { .sec = 0, .min = 1, .hour = 2, .day = 3, .wkday = 4, .month = 5, .year = 6 } |
| #define | I2C_RTC_INITIALIZER(i2c_path, i2c_address, offset, reg_order, driver_name, hwinit) |
| #define | I2C_RTC_TBL_ENTRY(dev_name, i2c_rtc_ctx) |
Generic I2C RTC driver.
Base functionality for I2C based RTC drivers. An additional, chip specific initialization is necessary.
Expects a register block with the following time format:
- <base>+off.second:
- Bit 0 to 6: Seconds (BCD encoded)
- Bit 7: Don't care
- <base>+off.minute:
- Bit 0 to 6: Minutes (BCD encoded)
- Bit 7: Don't care
- <base>+off.hour:
- Bit 0 to 5: Hours (BCD encoded); Bit 5 indicates AM (0) and PM (1) in 12 hour mode
- Bit 6: 0 for 24 hour mode; 1 for 12 hour mode
- <base>+off.wkday:
- Bit 0 to 2: Day of Week
- Bit 3 to 7: Don't care
- <base>+off.day:
- Bit 0 to 5: Day (BCD encoded)
- Bit 6 and 7: Don't care
- <base>+off.month:
- Bit 0 to 4: Month (BCD encoded)
- Bit 5 to 7: Don't care
- <base>+off.year:
- Bit 0 to 6: Year (BCD encoded)
- Bit 7: Don't care
See abeoz9 or mcp7940m for how to use this base driver.