Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-fm3130.c File Reference
#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.

Data Structures

struct  fm3130
 

Macros

#define FM3130_RTC_CONTROL   (0x0)
 
#define FM3130_CAL_CONTROL   (0x1)
 
#define FM3130_RTC_SECONDS   (0x2)
 
#define FM3130_RTC_MINUTES   (0x3)
 
#define FM3130_RTC_HOURS   (0x4)
 
#define FM3130_RTC_DAY   (0x5)
 
#define FM3130_RTC_DATE   (0x6)
 
#define FM3130_RTC_MONTHS   (0x7)
 
#define FM3130_RTC_YEARS   (0x8)
 
#define FM3130_ALARM_SECONDS   (0x9)
 
#define FM3130_ALARM_MINUTES   (0xa)
 
#define FM3130_ALARM_HOURS   (0xb)
 
#define FM3130_ALARM_DATE   (0xc)
 
#define FM3130_ALARM_MONTHS   (0xd)
 
#define FM3130_ALARM_WP_CONTROL   (0xe)
 
#define FM3130_CAL_CONTROL_BIT_nOSCEN   (1 << 7) /* Osciallator enabled */
 
#define FM3130_RTC_CONTROL_BIT_LB   (1 << 7) /* Low battery */
 
#define FM3130_RTC_CONTROL_BIT_AF   (1 << 6) /* Alarm flag */
 
#define FM3130_RTC_CONTROL_BIT_CF   (1 << 5) /* Century overflow */
 
#define FM3130_RTC_CONTROL_BIT_POR   (1 << 4) /* Power on reset */
 
#define FM3130_RTC_CONTROL_BIT_AEN   (1 << 3) /* Alarm enable */
 
#define FM3130_RTC_CONTROL_BIT_CAL   (1 << 2) /* Calibration mode */
 
#define FM3130_RTC_CONTROL_BIT_WRITE   (1 << 1) /* W=1 -> write mode W=0 normal */
 
#define FM3130_RTC_CONTROL_BIT_READ   (1 << 0) /* R=1 -> read mode R=0 normal */
 
#define FM3130_CLOCK_REGS   7
 
#define FM3130_ALARM_REGS   5
 
#define FM3130_MODE_NORMAL   0
 
#define FM3130_MODE_WRITE   1
 
#define FM3130_MODE_READ   2
 

Functions

 MODULE_DEVICE_TABLE (i2c, fm3130_id)
 
 module_i2c_driver (fm3130_driver)
 
 MODULE_DESCRIPTION ("RTC driver for FM3130")
 
 MODULE_AUTHOR ("Sergey Lapin <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define FM3130_ALARM_DATE   (0xc)

Definition at line 31 of file rtc-fm3130.c.

#define FM3130_ALARM_HOURS   (0xb)

Definition at line 30 of file rtc-fm3130.c.

#define FM3130_ALARM_MINUTES   (0xa)

Definition at line 29 of file rtc-fm3130.c.

#define FM3130_ALARM_MONTHS   (0xd)

Definition at line 32 of file rtc-fm3130.c.

#define FM3130_ALARM_REGS   5

Definition at line 46 of file rtc-fm3130.c.

#define FM3130_ALARM_SECONDS   (0x9)

Definition at line 28 of file rtc-fm3130.c.

#define FM3130_ALARM_WP_CONTROL   (0xe)

Definition at line 33 of file rtc-fm3130.c.

#define FM3130_CAL_CONTROL   (0x1)

Definition at line 19 of file rtc-fm3130.c.

#define FM3130_CAL_CONTROL_BIT_nOSCEN   (1 << 7) /* Osciallator enabled */

Definition at line 35 of file rtc-fm3130.c.

#define FM3130_CLOCK_REGS   7

Definition at line 45 of file rtc-fm3130.c.

#define FM3130_MODE_NORMAL   0

Definition at line 64 of file rtc-fm3130.c.

#define FM3130_MODE_READ   2

Definition at line 66 of file rtc-fm3130.c.

#define FM3130_MODE_WRITE   1

Definition at line 65 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL   (0x0)

Definition at line 18 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_AEN   (1 << 3) /* Alarm enable */

Definition at line 40 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_AF   (1 << 6) /* Alarm flag */

Definition at line 37 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_CAL   (1 << 2) /* Calibration mode */

Definition at line 41 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_CF   (1 << 5) /* Century overflow */

Definition at line 38 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_LB   (1 << 7) /* Low battery */

Definition at line 36 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_POR   (1 << 4) /* Power on reset */

Definition at line 39 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_READ   (1 << 0) /* R=1 -> read mode R=0 normal */

Definition at line 43 of file rtc-fm3130.c.

#define FM3130_RTC_CONTROL_BIT_WRITE   (1 << 1) /* W=1 -> write mode W=0 normal */

Definition at line 42 of file rtc-fm3130.c.

#define FM3130_RTC_DATE   (0x6)

Definition at line 24 of file rtc-fm3130.c.

#define FM3130_RTC_DAY   (0x5)

Definition at line 23 of file rtc-fm3130.c.

#define FM3130_RTC_HOURS   (0x4)

Definition at line 22 of file rtc-fm3130.c.

#define FM3130_RTC_MINUTES   (0x3)

Definition at line 21 of file rtc-fm3130.c.

#define FM3130_RTC_MONTHS   (0x7)

Definition at line 25 of file rtc-fm3130.c.

#define FM3130_RTC_SECONDS   (0x2)

Definition at line 20 of file rtc-fm3130.c.

#define FM3130_RTC_YEARS   (0x8)

Definition at line 26 of file rtc-fm3130.c.

Function Documentation

MODULE_AUTHOR ( "Sergey Lapin <[email protected]>"  )
MODULE_DESCRIPTION ( "RTC driver for FM3130"  )
MODULE_DEVICE_TABLE ( i2c  ,
fm3130_id   
)
module_i2c_driver ( fm3130_driver  )
MODULE_LICENSE ( "GPL"  )