[Feature][ZXW-241]merge P56U01 version
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/ap/os/linux/linux-3.4.x/drivers/rtc/zx234290-rtc.c b/ap/os/linux/linux-3.4.x/drivers/rtc/zx234290-rtc.c
index 54428db..1ea194c 100755
--- a/ap/os/linux/linux-3.4.x/drivers/rtc/zx234290-rtc.c
+++ b/ap/os/linux/linux-3.4.x/drivers/rtc/zx234290-rtc.c
@@ -279,7 +279,7 @@
zte_send_hour_irq_event();
return IRQ_HANDLED;
}
-/*alarm enable/disable, 0:disable 1:enable*/
+/*alarm enable/disable, 1:disable 0:enable*/
int zx234290_rtc_alarm_enable(zx234290_alarm_type type, unsigned int enabled)
{
int ret = 0;
@@ -351,7 +351,15 @@
int reg_val=0, mask=0;
pr_debug("%s: aie=%d\n", __func__, enabled);
-
+
+ if(0==enabled)//disable alarm
+ {
+ zx234290_rtc_alarm_enable(ALARM_SECOND, 1);
+ zx234290_rtc_alarm_enable(ALARM_MINUTE, 1);
+ zx234290_rtc_alarm_enable(ALARM_HOUR, 1);
+ zx234290_rtc_alarm_enable(ALARM_DAY, 1);
+ zx234290_rtc_alarm_enable(ALARM_WEEKDAY, 1);
+ };
/*enable/disable AIE bit*/
mask = ZX234290_BITFMASK(ZX234290_RTC_AIE_WID, ZX234290_RTC_AIE_LSH);
reg_val= ZX234290_BITFVAL(enabled, ZX234290_RTC_AIE_LSH);