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

2017-01-26 Thread Alexandre Belloni
Hi, On 24/10/2016 at 09:42:16 +0800, Meng Yi wrote: > For the platforms including LS1021A, LS1043A that has the > flextimer module, implementing alarm functions within RTC > subsystem to wakeup the system when system going to sleep. > Only Ftm0 can be used to wakeup the system. > > Signed-off-by:

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

2016-12-01 Thread Meng Yi
> > > + > > > +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

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

2016-11-30 Thread Alexandre Belloni
On 02/11/2016 at 08:23:32 +, Meng Yi wrote : > > + > > +static int ftm_alarm_irq_enable(struct device *dev, unsigned int > > +enabled) { > > + if (enabled) > > + ftm_irq_enable(true); > > + else > > + ftm_irq_enable(false); > > + > > + return 0; > > +} > > + > > +stati

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

2016-11-02 Thread Meng Yi
> + > +static int ftm_alarm_irq_enable(struct device *dev, unsigned int > +enabled) { > + if (enabled) > + ftm_irq_enable(true); > + else > + ftm_irq_enable(false); > + > + return 0; > +} > + > +static int nxp_ftm_rtc_read_time(struct device *dev, struct rtc_time

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

2016-10-23 Thread Meng Yi
For the platforms including LS1021A, LS1043A that has the flextimer module, implementing alarm functions within RTC subsystem to wakeup the system when system going to sleep. Only Ftm0 can be used to wakeup the system. Signed-off-by: Meng Yi --- drivers/rtc/Kconfig | 9 ++ drivers/rtc/Ma