Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-pcf2123.c File Reference
#include <linux/bcd.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/sysfs.h>

Go to the source code of this file.

Data Structures

struct  pcf2123_sysfs_reg
 
struct  pcf2123_plat_data
 

Macros

#define DRV_VERSION   "0.6"
 
#define PCF2123_REG_CTRL1   (0x00) /* Control Register 1 */
 
#define PCF2123_REG_CTRL2   (0x01) /* Control Register 2 */
 
#define PCF2123_REG_SC   (0x02) /* datetime */
 
#define PCF2123_REG_MN   (0x03)
 
#define PCF2123_REG_HR   (0x04)
 
#define PCF2123_REG_DM   (0x05)
 
#define PCF2123_REG_DW   (0x06)
 
#define PCF2123_REG_MO   (0x07)
 
#define PCF2123_REG_YR   (0x08)
 
#define PCF2123_SUBADDR   (1 << 4)
 
#define PCF2123_WRITE   ((0 << 7) | PCF2123_SUBADDR)
 
#define PCF2123_READ   ((1 << 7) | PCF2123_SUBADDR)
 

Functions

 module_spi_driver (pcf2123_driver)
 
 MODULE_AUTHOR ("Chris Verges <[email protected]>")
 
 MODULE_DESCRIPTION ("NXP PCF2123 RTC driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 

Macro Definition Documentation

#define DRV_VERSION   "0.6"

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

#define PCF2123_READ   ((1 << 7) | PCF2123_SUBADDR)

Definition at line 62 of file rtc-pcf2123.c.

#define PCF2123_REG_CTRL1   (0x00) /* Control Register 1 */

Definition at line 50 of file rtc-pcf2123.c.

#define PCF2123_REG_CTRL2   (0x01) /* Control Register 2 */

Definition at line 51 of file rtc-pcf2123.c.

#define PCF2123_REG_DM   (0x05)

Definition at line 55 of file rtc-pcf2123.c.

#define PCF2123_REG_DW   (0x06)

Definition at line 56 of file rtc-pcf2123.c.

#define PCF2123_REG_HR   (0x04)

Definition at line 54 of file rtc-pcf2123.c.

#define PCF2123_REG_MN   (0x03)

Definition at line 53 of file rtc-pcf2123.c.

#define PCF2123_REG_MO   (0x07)

Definition at line 57 of file rtc-pcf2123.c.

#define PCF2123_REG_SC   (0x02) /* datetime */

Definition at line 52 of file rtc-pcf2123.c.

#define PCF2123_REG_YR   (0x08)

Definition at line 58 of file rtc-pcf2123.c.

#define PCF2123_SUBADDR   (1 << 4)

Definition at line 60 of file rtc-pcf2123.c.

#define PCF2123_WRITE   ((0 << 7) | PCF2123_SUBADDR)

Definition at line 61 of file rtc-pcf2123.c.

Function Documentation

MODULE_AUTHOR ( "Chris Verges <[email protected]>"  )
MODULE_DESCRIPTION ( "NXP PCF2123 RTC driver )
MODULE_LICENSE ( "GPL"  )
module_spi_driver ( pcf2123_driver  )
MODULE_VERSION ( DRV_VERSION  )