Thread (5 messages) 5 messages, 2 authors, 2017-01-27

[rtc-linux] RE: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source

From: Meng Yi <hidden>
Date: 2016-12-02 02:27:11
Also in: lkml

quoted
quoted
+
+static int nxp_ftm_rtc_read_time(struct device *dev, struct
+rtc_time
+*tm) {
+	struct timeval time;
+	unsigned long local_time;
+
+	do_gettimeofday(&time);
+	local_time = (u32)(time.tv_sec - (sys_tz.tz_minuteswest * 60));
+	rtc_time_to_tm(local_time, tm);
+
+	return 0;
+}
+
This is not really getting time from the RTC since FTM is not a RTC
device, But we need to get the time to setup alarm, so we are using system
time for now.
quoted
Anybody have better idea?
No, that seems fine to me. I'll review the rest of the driver.
Thanks for your review, any feedback is welcomed!

--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Meng

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help