Home
last modified time | relevance | path

Searched refs:wkalrm (Results 1 – 8 of 8) sorted by relevance

/drivers/rtc/
Drtc-efi.c120 static int efi_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in efi_read_alarm() argument
128 status = efi.get_wakeup_time((efi_bool_t *)&wkalrm->enabled, in efi_read_alarm()
129 (efi_bool_t *)&wkalrm->pending, &eft); in efi_read_alarm()
134 if (!convert_from_efi_time(&eft, &wkalrm->time)) in efi_read_alarm()
137 return rtc_valid_tm(&wkalrm->time); in efi_read_alarm()
140 static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in efi_set_alarm() argument
145 convert_to_efi_time(&wkalrm->time, &eft); in efi_set_alarm()
155 status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft); in efi_set_alarm()
Drtc-lpc32xx.c96 struct rtc_wkalrm *wkalrm) in lpc32xx_rtc_read_alarm() argument
100 rtc_time_to_tm(rtc_readl(rtc, LPC32XX_RTC_MATCH0), &wkalrm->time); in lpc32xx_rtc_read_alarm()
101 wkalrm->enabled = rtc->alarm_enabled; in lpc32xx_rtc_read_alarm()
102 wkalrm->pending = !!(rtc_readl(rtc, LPC32XX_RTC_INTSTAT) & in lpc32xx_rtc_read_alarm()
105 return rtc_valid_tm(&wkalrm->time); in lpc32xx_rtc_read_alarm()
109 struct rtc_wkalrm *wkalrm) in lpc32xx_rtc_set_alarm() argument
116 ret = rtc_tm_to_time(&wkalrm->time, &alarmsecs); in lpc32xx_rtc_set_alarm()
130 rtc->alarm_enabled = wkalrm->enabled; in lpc32xx_rtc_set_alarm()
131 if (wkalrm->enabled) { in lpc32xx_rtc_set_alarm()
Drtc-lpc24xx.c116 static int lpc24xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in lpc24xx_rtc_read_alarm() argument
119 struct rtc_time *tm = &wkalrm->time; in lpc24xx_rtc_read_alarm()
130 wkalrm->enabled = rtc_readl(rtc, LPC24XX_AMR) == 0; in lpc24xx_rtc_read_alarm()
131 wkalrm->pending = !!(rtc_readl(rtc, LPC24XX_ILR) & LPC24XX_RTCCIF); in lpc24xx_rtc_read_alarm()
133 return rtc_valid_tm(&wkalrm->time); in lpc24xx_rtc_read_alarm()
136 static int lpc24xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in lpc24xx_rtc_set_alarm() argument
139 struct rtc_time *tm = &wkalrm->time; in lpc24xx_rtc_set_alarm()
153 if (wkalrm->enabled) in lpc24xx_rtc_set_alarm()
Drtc-vr41xx.c164 static int vr41xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in vr41xx_rtc_read_alarm() argument
167 struct rtc_time *time = &wkalrm->time; in vr41xx_rtc_read_alarm()
174 wkalrm->enabled = alarm_enabled; in vr41xx_rtc_read_alarm()
183 static int vr41xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in vr41xx_rtc_set_alarm() argument
186 struct rtc_time *time = &wkalrm->time; in vr41xx_rtc_set_alarm()
200 if (wkalrm->enabled) in vr41xx_rtc_set_alarm()
203 alarm_enabled = wkalrm->enabled; in vr41xx_rtc_set_alarm()
Drtc-sun6i.c201 static int sun6i_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sun6i_rtc_getalarm() argument
213 wkalrm->enabled = !!(alrm_en & SUN6I_ALRM_EN_CNT_EN); in sun6i_rtc_getalarm()
214 wkalrm->pending = !!(alrm_st & SUN6I_ALRM_EN_CNT_EN); in sun6i_rtc_getalarm()
215 rtc_time_to_tm(chip->alarm, &wkalrm->time); in sun6i_rtc_getalarm()
220 static int sun6i_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sun6i_rtc_setalarm() argument
223 struct rtc_time *alrm_tm = &wkalrm->time; in sun6i_rtc_setalarm()
257 sun6i_rtc_setaie(wkalrm->enabled, chip); in sun6i_rtc_setalarm()
Drtc-sunxi.c198 static int sunxi_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sunxi_rtc_getalarm() argument
201 struct rtc_time *alrm_tm = &wkalrm->time; in sunxi_rtc_getalarm()
228 wkalrm->enabled = 1; in sunxi_rtc_getalarm()
267 static int sunxi_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sunxi_rtc_setalarm() argument
270 struct rtc_time *alrm_tm = &wkalrm->time; in sunxi_rtc_setalarm()
318 sunxi_rtc_setaie(wkalrm->enabled, chip); in sunxi_rtc_setalarm()
Drtc-sh.c469 static int sh_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sh_rtc_read_alarm() argument
473 struct rtc_time *tm = &wkalrm->time; in sh_rtc_read_alarm()
487 wkalrm->enabled = (readb(rtc->regbase + RCR1) & RCR1_AIE) ? 1 : 0; in sh_rtc_read_alarm()
539 static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sh_rtc_set_alarm() argument
544 struct rtc_time *tm = &wkalrm->time; in sh_rtc_set_alarm()
569 if (wkalrm->enabled) { in sh_rtc_set_alarm()
Drtc-st-lpc.c131 static int st_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in st_rtc_read_alarm() argument
138 memcpy(wkalrm, &rtc->alarm, sizeof(struct rtc_wkalrm)); in st_rtc_read_alarm()