From c58411e95d7f5062dedd1a3064af4d359da1e633 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:34 -0800 Subject: [PATCH] RTC Subsystem: library functions RTC and date/time related functions. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 drivers/rtc/Kconfig (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig new file mode 100644 index 00000000000..15df7c130fa --- /dev/null +++ b/drivers/rtc/Kconfig @@ -0,0 +1,6 @@ +# +# RTC class/drivers configuration +# + +config RTC_LIB + tristate \ No newline at end of file -- cgit v1.2.3 From 0c86edc0d4970649f39748c4ce4f2895f728468f Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:37 -0800 Subject: [PATCH] RTC subsystem: class Add the basic RTC subsystem infrastructure to the kernel. rtc/class.c - registration facilities for RTC drivers rtc/interface.c - kernel/rtc interface functions rtc/hctosys.c - snippet of code that copies hw clock to sw clock at bootup, if configured to do so. Signed-off-by: Alessandro Zummo Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 15df7c130fa..a256f67b78e 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -1,6 +1,46 @@ -# +\# # RTC class/drivers configuration # +menu "Real Time Clock" + config RTC_LIB - tristate \ No newline at end of file + tristate + +config RTC_CLASS + tristate "RTC class" + depends on EXPERIMENTAL + default n + select RTC_LIB + help + Generic RTC class support. If you say yes here, you will + be allowed to plug one or more RTCs to your system. You will + probably want to enable one of more of the interfaces below. + + This driver can also be built as a module. If so, the module + will be called rtc-class. + +config RTC_HCTOSYS + bool "Set system time from RTC on startup" + depends on RTC_CLASS = y + default y + help + If you say yes here, the system time will be set using + the value read from the specified RTC device. This is useful + in order to avoid unnecessary fschk runs. + +config RTC_HCTOSYS_DEVICE + string "The RTC to read the time from" + depends on RTC_HCTOSYS = y + default "rtc0" + help + The RTC device that will be used as the source for + the system time, usually rtc0. + +comment "RTC interfaces" + depends on RTC_CLASS + +comment "RTC drivers" + depends on RTC_CLASS + +endmenu -- cgit v1.2.3 From c5c3e19225217536d90515c494e55e642a21e4fa Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:39 -0800 Subject: [PATCH] RTC subsystem: sysfs interface This patch adds the sysfs interface to the RTC subsystem. Each RTC client will have his own entry under /sys/classs/rtc/rtcN . Within this entry some attributes are exported by the subsystem, like date and time. Signed-off-by: Alessandro Zummo Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index a256f67b78e..82449992048 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -40,6 +40,17 @@ config RTC_HCTOSYS_DEVICE comment "RTC interfaces" depends on RTC_CLASS +config RTC_INTF_SYSFS + tristate "sysfs" + depends on RTC_CLASS && SYSFS + default RTC_CLASS + help + Say yes here if you want to use your RTC using the sysfs + interface, /sys/class/rtc/rtcX . + + This driver can also be built as a module. If so, the module + will be called rtc-sysfs. + comment "RTC drivers" depends on RTC_CLASS -- cgit v1.2.3 From 728a294787b780130d8eb237518d4cac0afe760c Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:40 -0800 Subject: [PATCH] RTC subsystem: proc interface Add the proc interface to the RTC subsystem. The first RTC driver which registers with the class will be accessible by /proc/driver/rtc . This is required for compatibility with the standard RTC driver and to avoid breaking any user space application which may erroneusly rely on this. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 82449992048..200fb06b788 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -51,6 +51,17 @@ config RTC_INTF_SYSFS This driver can also be built as a module. If so, the module will be called rtc-sysfs. +config RTC_INTF_PROC + tristate "proc" + depends on RTC_CLASS && PROC_FS + default RTC_CLASS + help + Say yes here if you want to use your RTC using the proc + interface, /proc/driver/rtc . + + This driver can also be built as a module. If so, the module + will be called rtc-proc. + comment "RTC drivers" depends on RTC_CLASS -- cgit v1.2.3 From e824290e5dcfaf2120da587b16d10dfdff8d5d3e Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:41 -0800 Subject: [PATCH] RTC subsystem: dev interface Add the dev interface to the RTC subsystem. Each RTC will be available under /dev/rtcX . A symlink from /dev/rtc0 to /dev/rtc cab be obtained with the following udev rule: KERNEL=="rtc0", SYMLINK+="rtc" Signed-off-by: Alessandro Zummo Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 200fb06b788..8e4dc32058d 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -62,6 +62,17 @@ config RTC_INTF_PROC This driver can also be built as a module. If so, the module will be called rtc-proc. +config RTC_INTF_DEV + tristate "dev" + depends on RTC_CLASS + default RTC_CLASS + help + Say yes here if you want to use your RTC using the dev + interface, /dev/rtc . + + This driver can also be built as a module. If so, the module + will be called rtc-dev. + comment "RTC drivers" depends on RTC_CLASS -- cgit v1.2.3 From 1fec7c66ba98fc3a04e15fd14fad6b404e56fc94 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:42 -0800 Subject: [PATCH] RTC subsystem: X1205 driver A port of the existing x1205 driver under the new RTC subsystem. It is actually under test within the NSLU2 project (http://www.nslu2-linux.org) and it is working quite well. It is the first driver under this new subsystem and should be used as a guide to port other drivers. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 8e4dc32058d..3de823f2f05 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -76,4 +76,14 @@ config RTC_INTF_DEV comment "RTC drivers" depends on RTC_CLASS +config RTC_DRV_X1205 + tristate "Xicor/Intersil X1205" + depends on RTC_CLASS && I2C + help + If you say yes here you get support for the + Xicor/Intersil X1205 RTC chip. + + This driver can also be built as a module. If so, the module + will be called rtc-x1205. + endmenu -- cgit v1.2.3 From a95579cd4b40a4e062e187d931f498145551ee29 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:42 -0800 Subject: [PATCH] RTC subsystem: test device/driver Interrupts can be generated by echo "alarm|tick|update" >/sys/class/rtc/rtcX/device/irq Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 3de823f2f05..7eb1368d04f 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -86,4 +86,19 @@ config RTC_DRV_X1205 This driver can also be built as a module. If so, the module will be called rtc-x1205. +config RTC_DRV_TEST + tristate "Test driver/device" + depends on RTC_CLASS + help + If you say yes here you get support for the + RTC test driver. It's a software RTC which can be + used to test the RTC subsystem APIs. It gets + the time from the system clock. + You want this driver only if you are doing development + on the RTC subsystem. Please read the source code + for further details. + + This driver can also be built as a module. If so, the module + will be called rtc-test. + endmenu -- cgit v1.2.3 From edf1aaa31fc52ade0da7b6d1f2dffc17f0bdb9ff Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:43 -0800 Subject: [PATCH] RTC subsystem: DS1672 driver Driver for the Dallas/Maxim DS1672 chip, found on the Loft (http://www.giantshoulderinc.com). Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7eb1368d04f..de335265865 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -86,6 +86,16 @@ config RTC_DRV_X1205 This driver can also be built as a module. If so, the module will be called rtc-x1205. +config RTC_DRV_DS1672 + tristate "Dallas/Maxim DS1672" + depends on RTC_CLASS && I2C + help + If you say yes here you get support for the + Dallas/Maxim DS1672 timekeeping chip. + + This driver can also be built as a module. If so, the module + will be called rtc-ds1672. + config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS -- cgit v1.2.3 From b5a82d628d4491558c109fbeabc2993d6686e89c Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:44 -0800 Subject: [PATCH] RTC subsystem: PCF8563 driver An RTC class aware driver for the Philips PCF8563 RTC and Epson RTC8564 chips. This chip is used on the Iomega NAS100D. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index de335265865..0309fb36875 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -96,6 +96,17 @@ config RTC_DRV_DS1672 This driver can also be built as a module. If so, the module will be called rtc-ds1672. +config RTC_DRV_PCF8563 + tristate "Philips PCF8563/Epson RTC8564" + depends on RTC_CLASS && I2C + help + If you say yes here you get support for the + Philips PCF8563 RTC chip. The Epson RTC8564 + should work as well. + + This driver can also be built as a module. If so, the module + will be called rtc-pcf8563. + config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS -- cgit v1.2.3 From 7520b94debdc61620e1582fb4f5cca4a830f91cd Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:45 -0800 Subject: [PATCH] RTC subsystem: RS5C372 driver RTC class aware driver for the Ricoh RS5C372 chip used, among others, on the Synology DS101. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 0309fb36875..609f5559345 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -107,6 +107,16 @@ config RTC_DRV_PCF8563 This driver can also be built as a module. If so, the module will be called rtc-pcf8563. +config RTC_DRV_RS5C372 + tristate "Ricoh RS5C372A/B" + depends on RTC_CLASS && I2C + help + If you say yes here you get support for the + Ricoh RS5C372A and RS5C372B RTC chips. + + This driver can also be built as a module. If so, the module + will be called rtc-rs5c372. + config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS -- cgit v1.2.3 From fd507e2ff3a5adaccbefa05f4bc9f58f44e930db Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:45 -0800 Subject: [PATCH] RTC subsystem: EP93XX driver This patch adds a driver for the RTC embedded in the Cirrus Logic EP93XX family of processors. Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 609f5559345..b399259784e 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -117,6 +117,17 @@ config RTC_DRV_RS5C372 This driver can also be built as a module. If so, the module will be called rtc-rs5c372. +config RTC_DRV_EP93XX + tristate "Cirrus Logic EP93XX" + depends on RTC_CLASS && ARCH_EP93XX + help + If you say yes here you get support for the + RTC embedded in the Cirrus Logic EP93XX processors. + + This driver can also be built as a module. If so, the module + will be called rtc-ep93xx. + + config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS -- cgit v1.2.3 From e842f1c8ff8a88f290e26d1139e89aad02c4e0c3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 27 Mar 2006 01:16:46 -0800 Subject: [PATCH] RTC subsystem: SA1100/PXA2XX driver Add an RTC subsystem driver for the ARM SA1100/PXA2XX processor RTC. Signed-off-by: Richard Purdie Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index b399259784e..166232a3f56 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -127,6 +127,15 @@ config RTC_DRV_EP93XX This driver can also be built as a module. If so, the module will be called rtc-ep93xx. +config RTC_DRV_SA1100 + tristate "SA11x0/PXA2xx" + depends on RTC_CLASS && (ARCH_SA1100 || ARCH_PXA) + help + If you say Y here you will get access to the real time clock + built into your SA11x0 or PXA2xx CPU. + + To compile this driver as a module, choose M here: the + module will be called rtc-sa1100. config RTC_DRV_TEST tristate "Test driver/device" -- cgit v1.2.3 From 1d98af87270cc08bb8251e004b9dc63cc838f24b Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Mon, 27 Mar 2006 01:16:47 -0800 Subject: [PATCH] RTC subsystem: M48T86 driver Add a driver for the ST M48T86 / Dallas DS12887 RTC. This is a platform driver. The platform device must provide I/O routines to access the RTC. Signed-off-by: Alessandro Zummo Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 166232a3f56..929dd809057 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -117,6 +117,16 @@ config RTC_DRV_RS5C372 This driver can also be built as a module. If so, the module will be called rtc-rs5c372. +config RTC_DRV_M48T86 + tristate "ST M48T86/Dallas DS12887" + depends on RTC_CLASS + help + If you say Y here you will get support for the + ST M48T86 and Dallas DS12887 RTC chips. + + This driver can also be built as a module. If so, the module + will be called rtc-m48t86. + config RTC_DRV_EP93XX tristate "Cirrus Logic EP93XX" depends on RTC_CLASS && ARCH_EP93XX -- cgit v1.2.3