+ rtc-more-xstp-vdet-support-for-rtc-rs5c348-driver.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     RTC: more XSTP/VDET support for rtc-rs5c348 driver

has been added to the -mm tree.  Its filename is

     rtc-more-xstp-vdet-support-for-rtc-rs5c348-driver.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: RTC: more XSTP/VDET support for rtc-rs5c348 driver
From: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>

If the chip detected "oscillator stop" condition, show an warning message. 
And initialize it with the Epoch time instead of leaving it with unknown
date/time.

Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
Acked-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/rtc/rtc-rs5c348.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -puN drivers/rtc/rtc-rs5c348.c~rtc-more-xstp-vdet-support-for-rtc-rs5c348-driver drivers/rtc/rtc-rs5c348.c
--- a/drivers/rtc/rtc-rs5c348.c~rtc-more-xstp-vdet-support-for-rtc-rs5c348-driver
+++ a/drivers/rtc/rtc-rs5c348.c
@@ -23,7 +23,7 @@
 #include <linux/workqueue.h>
 #include <linux/spi/spi.h>
 
-#define DRV_VERSION "0.1"
+#define DRV_VERSION "0.2"
 
 #define RS5C348_REG_SECS	0
 #define RS5C348_REG_MINS	1
@@ -175,8 +175,15 @@ static int __devinit rs5c348_probe(struc
 		goto kfree_exit;
 	if (ret & (RS5C348_BIT_XSTP | RS5C348_BIT_VDET)) {
 		u8 buf[2];
+		struct rtc_time tm;
 		if (ret & RS5C348_BIT_VDET)
 			dev_warn(&spi->dev, "voltage-low detected.\n");
+		if (ret & RS5C348_BIT_XSTP)
+			dev_warn(&spi->dev, "oscillator-stop detected.\n");
+		rtc_time_to_tm(0, &tm);	/* 1970/1/1 */
+		ret = rs5c348_rtc_set_time(&spi->dev, &tm);
+		if (ret < 0)
+			goto kfree_exit;
 		buf[0] = RS5C348_CMD_W(RS5C348_REG_CTL2);
 		buf[1] = 0;
 		ret = spi_write_then_read(spi, buf, sizeof(buf), NULL, 0);
_

Patches currently in -mm which might be from anemo@xxxxxxxxxxxxx are

simplify-update_times-avoid-jiffies-jiffies_64-aliasing-problem-2.patch
rtc-more-xstp-vdet-support-for-rtc-rs5c348-driver.patch
kill-wall_jiffies.patch
kill-wall_jiffies-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux