#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/slab.h>
Go to the source code of this file.
#define FM3130_ALARM_DATE (0xc) |
#define FM3130_ALARM_HOURS (0xb) |
#define FM3130_ALARM_MINUTES (0xa) |
#define FM3130_ALARM_MONTHS (0xd) |
#define FM3130_ALARM_REGS 5 |
#define FM3130_ALARM_SECONDS (0x9) |
#define FM3130_ALARM_WP_CONTROL (0xe) |
#define FM3130_CAL_CONTROL (0x1) |
#define FM3130_CAL_CONTROL_BIT_nOSCEN (1 << 7) /* Osciallator enabled */ |
#define FM3130_CLOCK_REGS 7 |
#define FM3130_MODE_NORMAL 0 |
#define FM3130_MODE_READ 2 |
#define FM3130_MODE_WRITE 1 |
#define FM3130_RTC_CONTROL (0x0) |
#define FM3130_RTC_CONTROL_BIT_AEN (1 << 3) /* Alarm enable */ |
#define FM3130_RTC_CONTROL_BIT_AF (1 << 6) /* Alarm flag */ |
#define FM3130_RTC_CONTROL_BIT_CAL (1 << 2) /* Calibration mode */ |
#define FM3130_RTC_CONTROL_BIT_CF (1 << 5) /* Century overflow */ |
#define FM3130_RTC_CONTROL_BIT_LB (1 << 7) /* Low battery */ |
#define FM3130_RTC_CONTROL_BIT_POR (1 << 4) /* Power on reset */ |
#define FM3130_RTC_CONTROL_BIT_READ (1 << 0) /* R=1 -> read mode R=0 normal */ |
#define FM3130_RTC_CONTROL_BIT_WRITE (1 << 1) /* W=1 -> write mode W=0 normal */ |
#define FM3130_RTC_DATE (0x6) |
#define FM3130_RTC_DAY (0x5) |
#define FM3130_RTC_HOURS (0x4) |
#define FM3130_RTC_MINUTES (0x3) |
#define FM3130_RTC_MONTHS (0x7) |
#define FM3130_RTC_SECONDS (0x2) |
#define FM3130_RTC_YEARS (0x8) |
MODULE_DESCRIPTION |
( |
"RTC driver for FM3130" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
fm3130_id |
|
|
) |
| |
module_i2c_driver |
( |
fm3130_driver |
| ) |
|