Skip to contentSkip to conversation

Add driver for STMicroelectronics M41T60 RTC

PATCH New Larry Johnson 1 participant 1 message Nov 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 Add driver for STMicroelectronics M41T60 RTC

This driver is based on the driver for the M41T11. In the intended application, the RTC will be powered by a large capacitor, rather than a battery. The driver therefore checks to see whether the RTC has lost power. The chip's OUT bit is normally reset from its power-up state. If the OUT bit is read as set, or if the date and time are not valid, then the RTC is assumed to have lost power, and its date and time are reset to

1900-01-01 00:00:00.

Support for adjusting the speed of the clock to improve accuracy is provided through an environment variable.

---

 rtc/Makefile |    2 +-
 rtc/m41t60.c |  261 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+), 1 deletions(-)
rtc/Makefile +1 -1
index 2e6f3bd..0895475 100644
@@ -32,7 +32,7 @@ COBJS	= date.o   \
 	  ds1337.o ds1374.o ds1556.o ds164x.o ds174x.o ds3231.o \
 	  m41t11.o max6900.o m48t35ax.o mc146818.o mk48t59.o \
 	  mpc5xxx.o mpc8xx.o pcf8563.o s3c24x0_rtc.o rs5c372.o \
-	  mcfrtc.o
+	  mcfrtc.o m41t60.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
rtc/m41t60.c new file +261 -0

261 lines not on this page · raw message