aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-17 10:01:45 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:29 -0500
commitd8468472e4206a6b3e777d29ee64eb91d2671415 (patch)
tree43202c86826d5840add0d5e2f31f87ec1ce300ee /include/asm-cris
parent34a8e501fe83f3b572eee56a6fca5111ab8cdf65 (diff)
CRIS v10: Cleanup rtc.h
- Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR - Whitespace and formatting.
Diffstat (limited to 'include/asm-cris')
-rw-r--r--include/asm-cris/rtc.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/include/asm-cris/rtc.h b/include/asm-cris/rtc.h
index cb4bf9217fee..17d3019529e1 100644
--- a/include/asm-cris/rtc.h
+++ b/include/asm-cris/rtc.h
@@ -1,10 +1,7 @@
1/* $Id: rtc.h,v 1.7 2002/11/04 07:32:09 starvik Exp $ */
2 1
3#ifndef __RTC_H__ 2#ifndef __RTC_H__
4#define __RTC_H__ 3#define __RTC_H__
5 4
6
7
8#ifdef CONFIG_ETRAX_DS1302 5#ifdef CONFIG_ETRAX_DS1302
9 /* Dallas DS1302 clock/calendar register numbers. */ 6 /* Dallas DS1302 clock/calendar register numbers. */
10# define RTC_SECONDS 0 7# define RTC_SECONDS 0
@@ -17,17 +14,17 @@
17# define RTC_CONTROL 7 14# define RTC_CONTROL 7
18 15
19 /* Bits in CONTROL register. */ 16 /* Bits in CONTROL register. */
20# define RTC_CONTROL_WRITEPROTECT 0x80 17# define RTC_CONTROL_WRITEPROTECT 0x80
21# define RTC_TRICKLECHARGER 8 18# define RTC_TRICKLECHARGER 8
22 19
23 /* Bits in TRICKLECHARGER register TCS TCS TCS TCS DS DS RS RS. */ 20 /* Bits in TRICKLECHARGER register TCS TCS TCS TCS DS DS RS RS. */
24# define RTC_TCR_PATTERN 0xA0 /* 1010xxxx */ 21# define RTC_TCR_PATTERN 0xA0 /* 1010xxxx */
25# define RTC_TCR_1DIOD 0x04 /* xxxx01xx */ 22# define RTC_TCR_1DIOD 0x04 /* xxxx01xx */
26# define RTC_TCR_2DIOD 0x08 /* xxxx10xx */ 23# define RTC_TCR_2DIOD 0x08 /* xxxx10xx */
27# define RTC_TCR_DISABLED 0x00 /* xxxxxx00 Disabled */ 24# define RTC_TCR_DISABLED 0x00 /* xxxxxx00 Disabled */
28# define RTC_TCR_2KOHM 0x01 /* xxxxxx01 2KOhm */ 25# define RTC_TCR_2KOHM 0x01 /* xxxxxx01 2KOhm */
29# define RTC_TCR_4KOHM 0x02 /* xxxxxx10 4kOhm */ 26# define RTC_TCR_4KOHM 0x02 /* xxxxxx10 4kOhm */
30# define RTC_TCR_8KOHM 0x03 /* xxxxxx11 8kOhm */ 27# define RTC_TCR_8KOHM 0x03 /* xxxxxx11 8kOhm */
31 28
32#elif defined(CONFIG_ETRAX_PCF8563) 29#elif defined(CONFIG_ETRAX_PCF8563)
33 /* I2C bus slave registers. */ 30 /* I2C bus slave registers. */
@@ -79,7 +76,7 @@ extern int pcf8563_init(void);
79 76
80/* 77/*
81 * The struct used to pass data via the following ioctl. Similar to the 78 * The struct used to pass data via the following ioctl. Similar to the
82 * struct tm in <time.h>, but it needs to be here so that the kernel 79 * struct tm in <time.h>, but it needs to be here so that the kernel
83 * source is self contained, allowing cross-compiles, etc. etc. 80 * source is self contained, allowing cross-compiles, etc. etc.
84 */ 81 */
85struct rtc_time { 82struct rtc_time {
@@ -96,11 +93,15 @@ struct rtc_time {
96 93
97/* ioctl() calls that are permitted to the /dev/rtc interface. */ 94/* ioctl() calls that are permitted to the /dev/rtc interface. */
98#define RTC_MAGIC 'p' 95#define RTC_MAGIC 'p'
99#define RTC_RD_TIME _IOR(RTC_MAGIC, 0x09, struct rtc_time) /* Read RTC time. */ 96/* Read RTC time. */
100#define RTC_SET_TIME _IOW(RTC_MAGIC, 0x0a, struct rtc_time) /* Set RTC time. */ 97#define RTC_RD_TIME _IOR(RTC_MAGIC, 0x09, struct rtc_time)
101#define RTC_SET_CHARGE _IOW(RTC_MAGIC, 0x0b, int) 98/* Set RTC time. */
102#define RTC_VLOW_RD _IOR(RTC_MAGIC, 0x11, int) /* Voltage Low detector */ 99#define RTC_SET_TIME _IOW(RTC_MAGIC, 0x0a, struct rtc_time)
103#define RTC_VLOW_SET _IO(RTC_MAGIC, 0x12) /* Clear voltage low information */ 100#define RTC_SET_CHARGE _IOW(RTC_MAGIC, 0x0b, int)
104#define RTC_MAX_IOCTL 0x12 101/* Voltage low detector */
102#define RTC_VL_READ _IOR(RTC_MAGIC, 0x13, int)
103/* Clear voltage low information */
104#define RTC_VL_CLR _IO(RTC_MAGIC, 0x14)
105#define RTC_MAX_IOCTL 0x14
105 106
106#endif /* __RTC_H__ */ 107#endif /* __RTC_H__ */