Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-pcf8583.c File Reference
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/rtc.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/bcd.h>

Go to the source code of this file.

Data Structures

struct  rtc_mem
 
struct  pcf8583
 

Macros

#define CTRL_STOP   0x80
 
#define CTRL_HOLD   0x40
 
#define CTRL_32KHZ   0x00
 
#define CTRL_MASK   0x08
 
#define CTRL_ALARMEN   0x04
 
#define CTRL_ALARM   0x02
 
#define CTRL_TIMER   0x01
 
#define get_ctrl(x)   ((struct pcf8583 *)i2c_get_clientdata(x))->ctrl
 
#define set_ctrl(x, v)   get_ctrl(x) = v
 
#define CMOS_YEAR   (64 + 128)
 
#define CMOS_CHECKSUM   (63)
 

Functions

 MODULE_DEVICE_TABLE (i2c, pcf8583_id)
 
 module_i2c_driver (pcf8583_driver)
 
 MODULE_AUTHOR ("Russell King")
 
 MODULE_DESCRIPTION ("PCF8583 I2C RTC driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CMOS_CHECKSUM   (63)

Definition at line 49 of file rtc-pcf8583.c.

#define CMOS_YEAR   (64 + 128)

Definition at line 48 of file rtc-pcf8583.c.

#define CTRL_32KHZ   0x00

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

#define CTRL_ALARM   0x02

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

#define CTRL_ALARMEN   0x04

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

#define CTRL_HOLD   0x40

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

#define CTRL_MASK   0x08

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

#define CTRL_STOP   0x80

Definition at line 34 of file rtc-pcf8583.c.

#define CTRL_TIMER   0x01

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

#define get_ctrl (   x)    ((struct pcf8583 *)i2c_get_clientdata(x))->ctrl

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

#define set_ctrl (   x,
  v 
)    get_ctrl(x) = v

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

Function Documentation

MODULE_AUTHOR ( "Russell King"  )
MODULE_DESCRIPTION ( "PCF8583 I2C RTC driver )
MODULE_DEVICE_TABLE ( i2c  ,
pcf8583_id   
)
module_i2c_driver ( pcf8583_driver  )
MODULE_LICENSE ( "GPL"  )