Searched refs:wkalrm (Results 1 – 8 of 8) sorted by relevance
/linux-6.6.21/drivers/rtc/ |
D | rtc-lpc32xx.c | 87 struct rtc_wkalrm *wkalrm) in lpc32xx_rtc_read_alarm() argument 91 rtc_time64_to_tm(rtc_readl(rtc, LPC32XX_RTC_MATCH0), &wkalrm->time); in lpc32xx_rtc_read_alarm() 92 wkalrm->enabled = rtc->alarm_enabled; in lpc32xx_rtc_read_alarm() 93 wkalrm->pending = !!(rtc_readl(rtc, LPC32XX_RTC_INTSTAT) & in lpc32xx_rtc_read_alarm() 96 return rtc_valid_tm(&wkalrm->time); in lpc32xx_rtc_read_alarm() 100 struct rtc_wkalrm *wkalrm) in lpc32xx_rtc_set_alarm() argument 106 alarmsecs = rtc_tm_to_time64(&wkalrm->time); in lpc32xx_rtc_set_alarm() 116 rtc->alarm_enabled = wkalrm->enabled; in lpc32xx_rtc_set_alarm() 117 if (wkalrm->enabled) { in lpc32xx_rtc_set_alarm()
|
D | rtc-efi.c | 115 static int efi_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in efi_read_alarm() argument 123 status = efi.get_wakeup_time((efi_bool_t *)&wkalrm->enabled, in efi_read_alarm() 124 (efi_bool_t *)&wkalrm->pending, &eft); in efi_read_alarm() 129 if (!convert_from_efi_time(&eft, &wkalrm->time)) in efi_read_alarm() 132 return rtc_valid_tm(&wkalrm->time); in efi_read_alarm() 135 static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in efi_set_alarm() argument 140 convert_to_efi_time(&wkalrm->time, &eft); in efi_set_alarm() 150 status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft); in efi_set_alarm()
|
D | rtc-lpc24xx.c | 110 static int lpc24xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in lpc24xx_rtc_read_alarm() argument 113 struct rtc_time *tm = &wkalrm->time; in lpc24xx_rtc_read_alarm() 124 wkalrm->enabled = rtc_readl(rtc, LPC24XX_AMR) == 0; in lpc24xx_rtc_read_alarm() 125 wkalrm->pending = !!(rtc_readl(rtc, LPC24XX_ILR) & LPC24XX_RTCCIF); in lpc24xx_rtc_read_alarm() 127 return rtc_valid_tm(&wkalrm->time); in lpc24xx_rtc_read_alarm() 130 static int lpc24xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in lpc24xx_rtc_set_alarm() argument 133 struct rtc_time *tm = &wkalrm->time; in lpc24xx_rtc_set_alarm() 147 if (wkalrm->enabled) in lpc24xx_rtc_set_alarm()
|
D | rtc-mt7622.c | 247 static int mtk_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in mtk_rtc_getalarm() argument 250 struct rtc_time *alrm_tm = &wkalrm->time; in mtk_rtc_getalarm() 254 wkalrm->enabled = !!(mtk_r32(hw, MTK_RTC_AL_CTL) & RTC_AL_EN); in mtk_rtc_getalarm() 255 wkalrm->pending = !!(mtk_r32(hw, MTK_RTC_INT) & RTC_INT_AL_STA); in mtk_rtc_getalarm() 260 static int mtk_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in mtk_rtc_setalarm() argument 263 struct rtc_time *alrm_tm = &wkalrm->time; in mtk_rtc_setalarm()
|
D | rtc-sunxi.c | 183 static int sunxi_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sunxi_rtc_getalarm() argument 186 struct rtc_time *alrm_tm = &wkalrm->time; in sunxi_rtc_getalarm() 213 wkalrm->enabled = 1; in sunxi_rtc_getalarm() 252 static int sunxi_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sunxi_rtc_setalarm() argument 255 struct rtc_time *alrm_tm = &wkalrm->time; in sunxi_rtc_setalarm() 303 sunxi_rtc_setaie(wkalrm->enabled, chip); in sunxi_rtc_setalarm()
|
D | rtc-sun6i.c | 500 static int sun6i_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sun6i_rtc_getalarm() argument 512 wkalrm->enabled = !!(alrm_en & SUN6I_ALRM_EN_CNT_EN); in sun6i_rtc_getalarm() 513 wkalrm->pending = !!(alrm_st & SUN6I_ALRM_EN_CNT_EN); in sun6i_rtc_getalarm() 514 rtc_time64_to_tm(chip->alarm, &wkalrm->time); in sun6i_rtc_getalarm() 519 static int sun6i_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sun6i_rtc_setalarm() argument 522 struct rtc_time *alrm_tm = &wkalrm->time; in sun6i_rtc_setalarm() 574 sun6i_rtc_setaie(wkalrm->enabled, chip); in sun6i_rtc_setalarm()
|
D | rtc-sh.c | 391 static int sh_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sh_rtc_read_alarm() argument 394 struct rtc_time *tm = &wkalrm->time; in sh_rtc_read_alarm() 407 wkalrm->enabled = (readb(rtc->regbase + RCR1) & RCR1_AIE) ? 1 : 0; in sh_rtc_read_alarm() 424 static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in sh_rtc_set_alarm() argument 428 struct rtc_time *tm = &wkalrm->time; in sh_rtc_set_alarm() 449 if (wkalrm->enabled) { in sh_rtc_set_alarm()
|
D | rtc-st-lpc.c | 123 static int st_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) in st_rtc_read_alarm() argument 130 memcpy(wkalrm, &rtc->alarm, sizeof(struct rtc_wkalrm)); in st_rtc_read_alarm()
|