Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-wm831x.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/bcd.h>
#include <linux/interrupt.h>
#include <linux/ioctl.h>
#include <linux/completion.h>
#include <linux/mfd/wm831x/core.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/random.h>

Go to the source code of this file.

Data Structures

struct  wm831x_rtc
 

Macros

#define WM831X_RTC_WR_CNT_MASK   0xFFFF /* RTC_WR_CNT - [15:0] */
 
#define WM831X_RTC_WR_CNT_SHIFT   0 /* RTC_WR_CNT - [15:0] */
 
#define WM831X_RTC_WR_CNT_WIDTH   16 /* RTC_WR_CNT - [15:0] */
 
#define WM831X_RTC_TIME_MASK   0xFFFF /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_TIME_SHIFT   0 /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_TIME_WIDTH   16 /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_TIME_MASK   0xFFFF /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_TIME_SHIFT   0 /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_TIME_WIDTH   16 /* RTC_TIME - [15:0] */
 
#define WM831X_RTC_ALM_MASK   0xFFFF /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_ALM_SHIFT   0 /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_ALM_WIDTH   16 /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_ALM_MASK   0xFFFF /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_ALM_SHIFT   0 /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_ALM_WIDTH   16 /* RTC_ALM - [15:0] */
 
#define WM831X_RTC_VALID   0x8000 /* RTC_VALID */
 
#define WM831X_RTC_VALID_MASK   0x8000 /* RTC_VALID */
 
#define WM831X_RTC_VALID_SHIFT   15 /* RTC_VALID */
 
#define WM831X_RTC_VALID_WIDTH   1 /* RTC_VALID */
 
#define WM831X_RTC_SYNC_BUSY   0x4000 /* RTC_SYNC_BUSY */
 
#define WM831X_RTC_SYNC_BUSY_MASK   0x4000 /* RTC_SYNC_BUSY */
 
#define WM831X_RTC_SYNC_BUSY_SHIFT   14 /* RTC_SYNC_BUSY */
 
#define WM831X_RTC_SYNC_BUSY_WIDTH   1 /* RTC_SYNC_BUSY */
 
#define WM831X_RTC_ALM_ENA   0x0400 /* RTC_ALM_ENA */
 
#define WM831X_RTC_ALM_ENA_MASK   0x0400 /* RTC_ALM_ENA */
 
#define WM831X_RTC_ALM_ENA_SHIFT   10 /* RTC_ALM_ENA */
 
#define WM831X_RTC_ALM_ENA_WIDTH   1 /* RTC_ALM_ENA */
 
#define WM831X_RTC_PINT_FREQ_MASK   0x0070 /* RTC_PINT_FREQ - [6:4] */
 
#define WM831X_RTC_PINT_FREQ_SHIFT   4 /* RTC_PINT_FREQ - [6:4] */
 
#define WM831X_RTC_PINT_FREQ_WIDTH   3 /* RTC_PINT_FREQ - [6:4] */
 
#define WM831X_RTC_TRIM_MASK   0x03FF /* RTC_TRIM - [9:0] */
 
#define WM831X_RTC_TRIM_SHIFT   0 /* RTC_TRIM - [9:0] */
 
#define WM831X_RTC_TRIM_WIDTH   10 /* RTC_TRIM - [9:0] */
 
#define WM831X_SET_TIME_RETRIES   5
 
#define WM831X_GET_TIME_RETRIES   5
 
#define wm831x_rtc_suspend   NULL
 
#define wm831x_rtc_resume   NULL
 
#define wm831x_rtc_freeze   NULL
 

Functions

 module_platform_driver (wm831x_rtc_driver)
 
 MODULE_AUTHOR ("Mark Brown <[email protected]>")
 
 MODULE_DESCRIPTION ("RTC driver for the WM831x series PMICs")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:wm831x-rtc")
 

Macro Definition Documentation

#define WM831X_GET_TIME_RETRIES   5

Definition at line 91 of file rtc-wm831x.c.

#define WM831X_RTC_ALM_ENA   0x0400 /* RTC_ALM_ENA */

Definition at line 75 of file rtc-wm831x.c.

#define WM831X_RTC_ALM_ENA_MASK   0x0400 /* RTC_ALM_ENA */

Definition at line 76 of file rtc-wm831x.c.

#define WM831X_RTC_ALM_ENA_SHIFT   10 /* RTC_ALM_ENA */

Definition at line 77 of file rtc-wm831x.c.

#define WM831X_RTC_ALM_ENA_WIDTH   1 /* RTC_ALM_ENA */

Definition at line 78 of file rtc-wm831x.c.

#define WM831X_RTC_ALM_MASK   0xFFFF /* RTC_ALM - [15:0] */

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

#define WM831X_RTC_ALM_MASK   0xFFFF /* RTC_ALM - [15:0] */

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

#define WM831X_RTC_ALM_SHIFT   0 /* RTC_ALM - [15:0] */

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

#define WM831X_RTC_ALM_SHIFT   0 /* RTC_ALM - [15:0] */

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

#define WM831X_RTC_ALM_WIDTH   16 /* RTC_ALM - [15:0] */

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

#define WM831X_RTC_ALM_WIDTH   16 /* RTC_ALM - [15:0] */

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

#define wm831x_rtc_freeze   NULL

Definition at line 412 of file rtc-wm831x.c.

#define WM831X_RTC_PINT_FREQ_MASK   0x0070 /* RTC_PINT_FREQ - [6:4] */

Definition at line 79 of file rtc-wm831x.c.

#define WM831X_RTC_PINT_FREQ_SHIFT   4 /* RTC_PINT_FREQ - [6:4] */

Definition at line 80 of file rtc-wm831x.c.

#define WM831X_RTC_PINT_FREQ_WIDTH   3 /* RTC_PINT_FREQ - [6:4] */

Definition at line 81 of file rtc-wm831x.c.

#define wm831x_rtc_resume   NULL

Definition at line 411 of file rtc-wm831x.c.

#define wm831x_rtc_suspend   NULL

Definition at line 410 of file rtc-wm831x.c.

#define WM831X_RTC_SYNC_BUSY   0x4000 /* RTC_SYNC_BUSY */

Definition at line 71 of file rtc-wm831x.c.

#define WM831X_RTC_SYNC_BUSY_MASK   0x4000 /* RTC_SYNC_BUSY */

Definition at line 72 of file rtc-wm831x.c.

#define WM831X_RTC_SYNC_BUSY_SHIFT   14 /* RTC_SYNC_BUSY */

Definition at line 73 of file rtc-wm831x.c.

#define WM831X_RTC_SYNC_BUSY_WIDTH   1 /* RTC_SYNC_BUSY */

Definition at line 74 of file rtc-wm831x.c.

#define WM831X_RTC_TIME_MASK   0xFFFF /* RTC_TIME - [15:0] */

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

#define WM831X_RTC_TIME_MASK   0xFFFF /* RTC_TIME - [15:0] */

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

#define WM831X_RTC_TIME_SHIFT   0 /* RTC_TIME - [15:0] */

Definition at line 47 of file rtc-wm831x.c.

#define WM831X_RTC_TIME_SHIFT   0 /* RTC_TIME - [15:0] */

Definition at line 47 of file rtc-wm831x.c.

#define WM831X_RTC_TIME_WIDTH   16 /* RTC_TIME - [15:0] */

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

#define WM831X_RTC_TIME_WIDTH   16 /* RTC_TIME - [15:0] */

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

#define WM831X_RTC_TRIM_MASK   0x03FF /* RTC_TRIM - [9:0] */

Definition at line 86 of file rtc-wm831x.c.

#define WM831X_RTC_TRIM_SHIFT   0 /* RTC_TRIM - [9:0] */

Definition at line 87 of file rtc-wm831x.c.

#define WM831X_RTC_TRIM_WIDTH   10 /* RTC_TRIM - [9:0] */

Definition at line 88 of file rtc-wm831x.c.

#define WM831X_RTC_VALID   0x8000 /* RTC_VALID */

Definition at line 67 of file rtc-wm831x.c.

#define WM831X_RTC_VALID_MASK   0x8000 /* RTC_VALID */

Definition at line 68 of file rtc-wm831x.c.

#define WM831X_RTC_VALID_SHIFT   15 /* RTC_VALID */

Definition at line 69 of file rtc-wm831x.c.

#define WM831X_RTC_VALID_WIDTH   1 /* RTC_VALID */

Definition at line 70 of file rtc-wm831x.c.

#define WM831X_RTC_WR_CNT_MASK   0xFFFF /* RTC_WR_CNT - [15:0] */

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

#define WM831X_RTC_WR_CNT_SHIFT   0 /* RTC_WR_CNT - [15:0] */

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

#define WM831X_RTC_WR_CNT_WIDTH   16 /* RTC_WR_CNT - [15:0] */

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

#define WM831X_SET_TIME_RETRIES   5

Definition at line 90 of file rtc-wm831x.c.

Function Documentation

MODULE_ALIAS ( "platform:wm831x-rtc )
MODULE_AUTHOR ( "Mark Brown <[email protected]>"  )
MODULE_DESCRIPTION ( "RTC driver for the WM831x series PMICs"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( wm831x_rtc_driver  )