| /Linux-v5.4/drivers/rtc/ |
| D | rtc-asm9260.c | 191 static int asm9260_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in asm9260_rtc_read_alarm() argument 195 alrm->time.tm_year = ioread32(priv->iobase + HW_ALYEAR); in asm9260_rtc_read_alarm() 196 alrm->time.tm_mon = ioread32(priv->iobase + HW_ALMON); in asm9260_rtc_read_alarm() 197 alrm->time.tm_mday = ioread32(priv->iobase + HW_ALDOM); in asm9260_rtc_read_alarm() 198 alrm->time.tm_wday = ioread32(priv->iobase + HW_ALDOW); in asm9260_rtc_read_alarm() 199 alrm->time.tm_yday = ioread32(priv->iobase + HW_ALDOY); in asm9260_rtc_read_alarm() 200 alrm->time.tm_hour = ioread32(priv->iobase + HW_ALHOUR); in asm9260_rtc_read_alarm() 201 alrm->time.tm_min = ioread32(priv->iobase + HW_ALMIN); in asm9260_rtc_read_alarm() 202 alrm->time.tm_sec = ioread32(priv->iobase + HW_ALSEC); in asm9260_rtc_read_alarm() 204 alrm->enabled = ioread32(priv->iobase + HW_AMR) ? 1 : 0; in asm9260_rtc_read_alarm() [all …]
|
| D | rtc-rk808.c | 191 static int rk808_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) in rk808_rtc_readalarm() argument 207 alrm->time.tm_sec = bcd2bin(alrm_data[0] & SECONDS_REG_MSK); in rk808_rtc_readalarm() 208 alrm->time.tm_min = bcd2bin(alrm_data[1] & MINUTES_REG_MAK); in rk808_rtc_readalarm() 209 alrm->time.tm_hour = bcd2bin(alrm_data[2] & HOURS_REG_MSK); in rk808_rtc_readalarm() 210 alrm->time.tm_mday = bcd2bin(alrm_data[3] & DAYS_REG_MSK); in rk808_rtc_readalarm() 211 alrm->time.tm_mon = (bcd2bin(alrm_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readalarm() 212 alrm->time.tm_year = (bcd2bin(alrm_data[5] & YEARS_REG_MSK)) + 100; in rk808_rtc_readalarm() 213 rockchip_to_gregorian(&alrm->time); in rk808_rtc_readalarm() 222 &alrm->time, alrm->time.tm_wday, &alrm->time); in rk808_rtc_readalarm() 224 alrm->enabled = (int_reg & BIT_RTC_INTERRUPTS_REG_IT_ALARM_M) ? 1 : 0; in rk808_rtc_readalarm() [all …]
|
| D | rtc-vt8500.c | 145 static int vt8500_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in vt8500_rtc_read_alarm() argument 153 alrm->time.tm_mday = bcd2bin((alarm & ALARM_DAY_MASK) >> ALARM_DAY_S); in vt8500_rtc_read_alarm() 154 alrm->time.tm_hour = bcd2bin((alarm & TIME_HOUR_MASK) >> TIME_HOUR_S); in vt8500_rtc_read_alarm() 155 alrm->time.tm_min = bcd2bin((alarm & TIME_MIN_MASK) >> TIME_MIN_S); in vt8500_rtc_read_alarm() 156 alrm->time.tm_sec = bcd2bin((alarm & TIME_SEC_MASK)); in vt8500_rtc_read_alarm() 158 alrm->enabled = (alarm & ALARM_ENABLE_MASK) ? 1 : 0; in vt8500_rtc_read_alarm() 159 alrm->pending = (isr & VT8500_RTC_IS_ALARM) ? 1 : 0; in vt8500_rtc_read_alarm() 161 return rtc_valid_tm(&alrm->time); in vt8500_rtc_read_alarm() 164 static int vt8500_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in vt8500_rtc_set_alarm() argument 168 writel((alrm->enabled ? ALARM_ENABLE_MASK : 0) in vt8500_rtc_set_alarm() [all …]
|
| D | rtc-tps80031.c | 143 static int tps80031_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in tps80031_rtc_set_alarm() argument 148 buff[0] = bin2bcd(alrm->time.tm_sec); in tps80031_rtc_set_alarm() 149 buff[1] = bin2bcd(alrm->time.tm_min); in tps80031_rtc_set_alarm() 150 buff[2] = bin2bcd(alrm->time.tm_hour); in tps80031_rtc_set_alarm() 151 buff[3] = bin2bcd(alrm->time.tm_mday); in tps80031_rtc_set_alarm() 152 buff[4] = bin2bcd(alrm->time.tm_mon + 1); in tps80031_rtc_set_alarm() 153 buff[5] = bin2bcd(alrm->time.tm_year % RTC_YEAR_OFFSET); in tps80031_rtc_set_alarm() 161 return tps80031_rtc_alarm_irq_enable(dev, alrm->enabled); in tps80031_rtc_set_alarm() 164 static int tps80031_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in tps80031_rtc_read_alarm() argument 178 alrm->time.tm_sec = bcd2bin(buff[0]); in tps80031_rtc_read_alarm() [all …]
|
| D | proc.c | 44 struct rtc_wkalrm alrm; in rtc_proc_show() local 55 err = rtc_read_alarm(rtc, &alrm); in rtc_proc_show() 57 seq_printf(seq, "alrm_time\t: %ptRt\n", &alrm.time); in rtc_proc_show() 58 seq_printf(seq, "alrm_date\t: %ptRd\n", &alrm.time); in rtc_proc_show() 60 alrm.enabled ? "yes" : "no"); in rtc_proc_show() 62 alrm.pending ? "yes" : "no"); in rtc_proc_show()
|
| D | rtc-puv3.c | 107 static int puv3_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) in puv3_rtc_getalarm() argument 109 struct rtc_time *alm_tm = &alrm->time; in puv3_rtc_getalarm() 113 alrm->enabled = readl(RTC_RTSR) & RTC_RTSR_ALE; in puv3_rtc_getalarm() 115 dev_dbg(dev, "read alarm: %d, %ptRr\n", alrm->enabled, alm_tm); in puv3_rtc_getalarm() 120 static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) in puv3_rtc_setalarm() argument 122 struct rtc_time *tm = &alrm->time; in puv3_rtc_setalarm() 125 dev_dbg(dev, "set alarm: %d, %ptRr\n", alrm->enabled, tm); in puv3_rtc_setalarm() 130 puv3_rtc_setaie(dev, alrm->enabled); in puv3_rtc_setalarm() 132 if (alrm->enabled) in puv3_rtc_setalarm()
|
| D | rtc-pcf85363.c | 181 static int pcf85363_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf85363_rtc_read_alarm() argument 193 alrm->time.tm_sec = bcd2bin(buf[0]); in pcf85363_rtc_read_alarm() 194 alrm->time.tm_min = bcd2bin(buf[1]); in pcf85363_rtc_read_alarm() 195 alrm->time.tm_hour = bcd2bin(buf[2]); in pcf85363_rtc_read_alarm() 196 alrm->time.tm_mday = bcd2bin(buf[3]); in pcf85363_rtc_read_alarm() 197 alrm->time.tm_mon = bcd2bin(buf[4]) - 1; in pcf85363_rtc_read_alarm() 203 alrm->enabled = !!(val & INT_A1IE); in pcf85363_rtc_read_alarm() 238 static int pcf85363_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf85363_rtc_set_alarm() argument 244 buf[0] = bin2bcd(alrm->time.tm_sec); in pcf85363_rtc_set_alarm() 245 buf[1] = bin2bcd(alrm->time.tm_min); in pcf85363_rtc_set_alarm() [all …]
|
| D | rtc-pcf50633.c | 171 static int pcf50633_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf50633_rtc_read_alarm() argument 179 alrm->enabled = rtc->alarm_enabled; in pcf50633_rtc_read_alarm() 180 alrm->pending = rtc->alarm_pending; in pcf50633_rtc_read_alarm() 189 pcf2rtc_time(&alrm->time, &pcf_tm); in pcf50633_rtc_read_alarm() 191 return rtc_valid_tm(&alrm->time); in pcf50633_rtc_read_alarm() 194 static int pcf50633_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf50633_rtc_set_alarm() argument 202 rtc2pcf_time(&pcf_tm, &alrm->time); in pcf50633_rtc_set_alarm() 216 if (!alrm->enabled) in pcf50633_rtc_set_alarm() 219 if (!alarm_masked || alrm->enabled) in pcf50633_rtc_set_alarm() 221 rtc->alarm_enabled = alrm->enabled; in pcf50633_rtc_set_alarm()
|
| D | rtc-goldfish.c | 33 struct rtc_wkalrm *alrm) in goldfish_rtc_read_alarm() argument 49 memset(alrm, 0, sizeof(struct rtc_wkalrm)); in goldfish_rtc_read_alarm() 51 rtc_time64_to_tm(rtc_alarm, &alrm->time); in goldfish_rtc_read_alarm() 54 alrm->enabled = 1; in goldfish_rtc_read_alarm() 56 alrm->enabled = 0; in goldfish_rtc_read_alarm() 62 struct rtc_wkalrm *alrm) in goldfish_rtc_set_alarm() argument 72 if (alrm->enabled) { in goldfish_rtc_set_alarm() 73 rtc_alarm64 = rtc_tm_to_time64(&alrm->time) * NSEC_PER_SEC; in goldfish_rtc_set_alarm()
|
| D | rtc-test.c | 24 static int test_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in test_rtc_read_alarm() argument 32 rtc_time64_to_tm(alarm, &alrm->time); in test_rtc_read_alarm() 33 alrm->enabled = rtd->alarm_en; in test_rtc_read_alarm() 38 static int test_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in test_rtc_set_alarm() argument 44 timeout = rtc_tm_to_time64(&alrm->time) - ktime_get_real_seconds(); in test_rtc_set_alarm() 56 if (alrm->enabled) in test_rtc_set_alarm() 59 rtd->alarm_en = alrm->enabled; in test_rtc_set_alarm()
|
| D | rtc-sc27xx.c | 302 static int sprd_rtc_read_aux_alarm(struct device *dev, struct rtc_wkalrm *alrm) in sprd_rtc_read_aux_alarm() argument 313 rtc_time64_to_tm(secs, &alrm->time); in sprd_rtc_read_aux_alarm() 319 alrm->enabled = !!(val & SPRD_RTC_AUXALM_EN); in sprd_rtc_read_aux_alarm() 325 alrm->pending = !!(val & SPRD_RTC_AUXALM_EN); in sprd_rtc_read_aux_alarm() 329 static int sprd_rtc_set_aux_alarm(struct device *dev, struct rtc_wkalrm *alrm) in sprd_rtc_set_aux_alarm() argument 332 time64_t secs = rtc_tm_to_time64(&alrm->time); in sprd_rtc_set_aux_alarm() 345 if (alrm->enabled) { in sprd_rtc_set_aux_alarm() 410 static int sprd_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in sprd_rtc_read_alarm() argument 426 return sprd_rtc_read_aux_alarm(dev, alrm); in sprd_rtc_read_alarm() 432 rtc_time64_to_tm(secs, &alrm->time); in sprd_rtc_read_alarm() [all …]
|
| D | rtc-stk17ta8.c | 159 static int stk17ta8_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in stk17ta8_rtc_set_alarm() argument 165 pdata->alrm_mday = alrm->time.tm_mday; in stk17ta8_rtc_set_alarm() 166 pdata->alrm_hour = alrm->time.tm_hour; in stk17ta8_rtc_set_alarm() 167 pdata->alrm_min = alrm->time.tm_min; in stk17ta8_rtc_set_alarm() 168 pdata->alrm_sec = alrm->time.tm_sec; in stk17ta8_rtc_set_alarm() 169 if (alrm->enabled) in stk17ta8_rtc_set_alarm() 175 static int stk17ta8_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in stk17ta8_rtc_read_alarm() argument 181 alrm->time.tm_mday = pdata->alrm_mday < 0 ? 0 : pdata->alrm_mday; in stk17ta8_rtc_read_alarm() 182 alrm->time.tm_hour = pdata->alrm_hour < 0 ? 0 : pdata->alrm_hour; in stk17ta8_rtc_read_alarm() 183 alrm->time.tm_min = pdata->alrm_min < 0 ? 0 : pdata->alrm_min; in stk17ta8_rtc_read_alarm() [all …]
|
| D | rtc-ds1553.c | 151 static int ds1553_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in ds1553_rtc_set_alarm() argument 157 pdata->alrm_mday = alrm->time.tm_mday; in ds1553_rtc_set_alarm() 158 pdata->alrm_hour = alrm->time.tm_hour; in ds1553_rtc_set_alarm() 159 pdata->alrm_min = alrm->time.tm_min; in ds1553_rtc_set_alarm() 160 pdata->alrm_sec = alrm->time.tm_sec; in ds1553_rtc_set_alarm() 161 if (alrm->enabled) in ds1553_rtc_set_alarm() 167 static int ds1553_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in ds1553_rtc_read_alarm() argument 173 alrm->time.tm_mday = pdata->alrm_mday < 0 ? 0 : pdata->alrm_mday; in ds1553_rtc_read_alarm() 174 alrm->time.tm_hour = pdata->alrm_hour < 0 ? 0 : pdata->alrm_hour; in ds1553_rtc_read_alarm() 175 alrm->time.tm_min = pdata->alrm_min < 0 ? 0 : pdata->alrm_min; in ds1553_rtc_read_alarm() [all …]
|
| D | rtc-88pm80x.c | 77 struct rtc_time *alrm) in rtc_next_alarm_time() argument 85 next->tm_hour = alrm->tm_hour; in rtc_next_alarm_time() 86 next->tm_min = alrm->tm_min; in rtc_next_alarm_time() 87 next->tm_sec = alrm->tm_sec; in rtc_next_alarm_time() 144 static int pm80x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pm80x_rtc_read_alarm() argument 163 rtc_time64_to_tm(ticks, &alrm->time); in pm80x_rtc_read_alarm() 165 alrm->enabled = (ret & PM800_ALARM1_EN) ? 1 : 0; in pm80x_rtc_read_alarm() 166 alrm->pending = (ret & (PM800_ALARM | PM800_ALARM_WAKEUP)) ? 1 : 0; in pm80x_rtc_read_alarm() 170 static int pm80x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pm80x_rtc_set_alarm() argument 195 rtc_next_alarm_time(&alarm_tm, &now_tm, &alrm->time); in pm80x_rtc_set_alarm() [all …]
|
| D | rtc-rv8803.c | 279 static int rv8803_get_alarm(struct device *dev, struct rtc_wkalrm *alrm) in rv8803_get_alarm() argument 294 alrm->time.tm_sec = 0; in rv8803_get_alarm() 295 alrm->time.tm_min = bcd2bin(alarmvals[0] & 0x7f); in rv8803_get_alarm() 296 alrm->time.tm_hour = bcd2bin(alarmvals[1] & 0x3f); in rv8803_get_alarm() 297 alrm->time.tm_mday = bcd2bin(alarmvals[2] & 0x3f); in rv8803_get_alarm() 299 alrm->enabled = !!(rv8803->ctrl & RV8803_CTRL_AIE); in rv8803_get_alarm() 300 alrm->pending = (flags & RV8803_FLAG_AF) && alrm->enabled; in rv8803_get_alarm() 305 static int rv8803_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in rv8803_set_alarm() argument 314 if (alrm->time.tm_sec) { in rv8803_set_alarm() 315 time64_t alarm_time = rtc_tm_to_time64(&alrm->time); in rv8803_set_alarm() [all …]
|
| D | rtc-max8925.c | 179 static int max8925_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8925_rtc_read_alarm() argument 188 ret = tm_calc(&alrm->time, buf, TIME_NUM); in max8925_rtc_read_alarm() 195 alrm->enabled = 0; in max8925_rtc_read_alarm() 201 alrm->enabled = 0; in max8925_rtc_read_alarm() 203 alrm->enabled = 1; in max8925_rtc_read_alarm() 209 alrm->pending = 1; in max8925_rtc_read_alarm() 211 alrm->pending = 0; in max8925_rtc_read_alarm() 217 static int max8925_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8925_rtc_set_alarm() argument 223 ret = data_calc(buf, &alrm->time, TIME_NUM); in max8925_rtc_set_alarm() 229 if (alrm->enabled) in max8925_rtc_set_alarm()
|
| D | rtc-pcf85063.c | 150 static int pcf85063_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf85063_rtc_read_alarm() argument 162 alrm->time.tm_sec = bcd2bin(buf[0]); in pcf85063_rtc_read_alarm() 163 alrm->time.tm_min = bcd2bin(buf[1]); in pcf85063_rtc_read_alarm() 164 alrm->time.tm_hour = bcd2bin(buf[2]); in pcf85063_rtc_read_alarm() 165 alrm->time.tm_mday = bcd2bin(buf[3]); in pcf85063_rtc_read_alarm() 171 alrm->enabled = !!(val & PCF85063_CTRL2_AIE); in pcf85063_rtc_read_alarm() 176 static int pcf85063_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pcf85063_rtc_set_alarm() argument 182 buf[0] = bin2bcd(alrm->time.tm_sec); in pcf85063_rtc_set_alarm() 183 buf[1] = bin2bcd(alrm->time.tm_min); in pcf85063_rtc_set_alarm() 184 buf[2] = bin2bcd(alrm->time.tm_hour); in pcf85063_rtc_set_alarm() [all …]
|
| D | rtc-ds1511.c | 312 ds1511_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in ds1511_rtc_set_alarm() argument 319 pdata->alrm_mday = alrm->time.tm_mday; in ds1511_rtc_set_alarm() 320 pdata->alrm_hour = alrm->time.tm_hour; in ds1511_rtc_set_alarm() 321 pdata->alrm_min = alrm->time.tm_min; in ds1511_rtc_set_alarm() 322 pdata->alrm_sec = alrm->time.tm_sec; in ds1511_rtc_set_alarm() 323 if (alrm->enabled) in ds1511_rtc_set_alarm() 331 ds1511_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in ds1511_rtc_read_alarm() argument 338 alrm->time.tm_mday = pdata->alrm_mday < 0 ? 0 : pdata->alrm_mday; in ds1511_rtc_read_alarm() 339 alrm->time.tm_hour = pdata->alrm_hour < 0 ? 0 : pdata->alrm_hour; in ds1511_rtc_read_alarm() 340 alrm->time.tm_min = pdata->alrm_min < 0 ? 0 : pdata->alrm_min; in ds1511_rtc_read_alarm() [all …]
|
| D | rtc-at91rm9200.c | 193 static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) in at91_rtc_readalarm() argument 195 struct rtc_time *tm = &alrm->time; in at91_rtc_readalarm() 200 alrm->enabled = (at91_rtc_read_imr() & AT91_RTC_ALARM) in at91_rtc_readalarm() 204 alrm->enabled ? "en" : "dis"); in at91_rtc_readalarm() 212 static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) in at91_rtc_setalarm() argument 218 tm.tm_mon = alrm->time.tm_mon; in at91_rtc_setalarm() 219 tm.tm_mday = alrm->time.tm_mday; in at91_rtc_setalarm() 220 tm.tm_hour = alrm->time.tm_hour; in at91_rtc_setalarm() 221 tm.tm_min = alrm->time.tm_min; in at91_rtc_setalarm() 222 tm.tm_sec = alrm->time.tm_sec; in at91_rtc_setalarm() [all …]
|
| D | rtc-rv3028.c | 271 static int rv3028_get_alarm(struct device *dev, struct rtc_wkalrm *alrm) in rv3028_get_alarm() argument 290 alrm->time.tm_sec = 0; in rv3028_get_alarm() 291 alrm->time.tm_min = bcd2bin(alarmvals[0] & 0x7f); in rv3028_get_alarm() 292 alrm->time.tm_hour = bcd2bin(alarmvals[1] & 0x3f); in rv3028_get_alarm() 293 alrm->time.tm_mday = bcd2bin(alarmvals[2] & 0x3f); in rv3028_get_alarm() 295 alrm->enabled = !!(ctrl & RV3028_CTRL2_AIE); in rv3028_get_alarm() 296 alrm->pending = (status & RV3028_STATUS_AF) && alrm->enabled; in rv3028_get_alarm() 301 static int rv3028_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in rv3028_set_alarm() argument 309 if (alrm->time.tm_sec) { in rv3028_set_alarm() 310 time64_t alarm_time = rtc_tm_to_time64(&alrm->time); in rv3028_set_alarm() [all …]
|
| D | rtc-as3722.c | 104 static int as3722_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in as3722_rtc_read_alarm() argument 118 as3722_reg_to_time(as_time_array, &alrm->time); in as3722_rtc_read_alarm() 122 static int as3722_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in as3722_rtc_set_alarm() argument 129 if (alrm->time.tm_year < (AS3722_RTC_START_YEAR - 1900)) in as3722_rtc_set_alarm() 138 as3722_time_to_reg(as_time_array, &alrm->time); in as3722_rtc_set_alarm() 146 if (alrm->enabled) in as3722_rtc_set_alarm() 147 ret = as3722_rtc_alarm_irq_enable(dev, alrm->enabled); in as3722_rtc_set_alarm()
|
| D | rtc-max8998.c | 136 static int max8998_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8998_rtc_read_alarm() argument 147 max8998_data_to_tm(data, &alrm->time); in max8998_rtc_read_alarm() 153 alrm->enabled = !!val; in max8998_rtc_read_alarm() 160 alrm->pending = 1; in max8998_rtc_read_alarm() 162 alrm->pending = 0; in max8998_rtc_read_alarm() 194 static int max8998_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8998_rtc_set_alarm() argument 200 max8998_tm_to_data(&alrm->time, data); in max8998_rtc_set_alarm() 213 if (alrm->enabled) in max8998_rtc_set_alarm()
|
| D | rtc-88pm860x.c | 84 struct rtc_time *alrm) in rtc_next_alarm_time() argument 92 next->tm_hour = alrm->tm_hour; in rtc_next_alarm_time() 93 next->tm_min = alrm->tm_min; in rtc_next_alarm_time() 94 next->tm_sec = alrm->tm_sec; in rtc_next_alarm_time() 163 static int pm860x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pm860x_rtc_read_alarm() argument 183 rtc_time_to_tm(ticks, &alrm->time); in pm860x_rtc_read_alarm() 185 alrm->enabled = (ret & ALARM_EN) ? 1 : 0; in pm860x_rtc_read_alarm() 186 alrm->pending = (ret & (ALARM | ALARM_WAKEUP)) ? 1 : 0; in pm860x_rtc_read_alarm() 190 static int pm860x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pm860x_rtc_set_alarm() argument 215 rtc_next_alarm_time(&alarm_tm, &now_tm, &alrm->time); in pm860x_rtc_set_alarm() [all …]
|
| D | rtc-pl030.c | 35 static int pl030_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pl030_read_alarm() argument 39 rtc_time_to_tm(readl(rtc->base + RTC_MR), &alrm->time); in pl030_read_alarm() 43 static int pl030_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in pl030_set_alarm() argument 52 ret = rtc_valid_tm(&alrm->time); in pl030_set_alarm() 54 ret = rtc_tm_to_time(&alrm->time, &time); in pl030_set_alarm()
|
| D | rtc-max8907.c | 121 static int max8907_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8907_rtc_read_alarm() argument 133 regs_to_tm(regs, &alrm->time); in max8907_rtc_read_alarm() 139 alrm->enabled = !!(val & 0x7f); in max8907_rtc_read_alarm() 144 static int max8907_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) in max8907_rtc_set_alarm() argument 150 tm_to_regs(&alrm->time, regs); in max8907_rtc_set_alarm() 162 if (alrm->enabled) in max8907_rtc_set_alarm()
|