/linux-master/drivers/rtc/ |
H A D | rtc-m48t35.c | 55 static int m48t35_read_time(struct device *dev, struct rtc_time *tm) argument 69 tm->tm_sec = readb(&priv->reg->sec); 70 tm->tm_min = readb(&priv->reg->min); 71 tm->tm_hour = readb(&priv->reg->hour); 72 tm->tm_mday = readb(&priv->reg->date); 73 tm->tm_mon = readb(&priv->reg->month); 74 tm->tm_year = readb(&priv->reg->year); 78 tm->tm_sec = bcd2bin(tm->tm_sec); 79 tm 97 m48t35_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-wilco-ec.c | 89 static int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm) argument 107 tm->tm_sec = rtc.second; 108 tm->tm_min = rtc.minute; 109 tm->tm_hour = rtc.hour; 110 tm->tm_mday = rtc.day; 111 tm->tm_mon = rtc.month - 1; 112 tm->tm_year = rtc.year + (rtc.century * 100) - 1900; 113 /* Ignore other tm fields, man rtc says userspace shouldn't use them. */ 115 if (rtc_valid_tm(tm)) { 116 dev_err(dev, "Time from RTC is invalid: %ptRr\n", tm); 123 wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-lpc24xx.c | 68 static int lpc24xx_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 75 rtc_writel(rtc, LPC24XX_SEC, tm->tm_sec); 76 rtc_writel(rtc, LPC24XX_MIN, tm->tm_min); 77 rtc_writel(rtc, LPC24XX_HOUR, tm->tm_hour); 78 rtc_writel(rtc, LPC24XX_DOW, tm->tm_wday); 79 rtc_writel(rtc, LPC24XX_DOM, tm->tm_mday); 80 rtc_writel(rtc, LPC24XX_DOY, tm->tm_yday); 81 rtc_writel(rtc, LPC24XX_MONTH, tm->tm_mon); 82 rtc_writel(rtc, LPC24XX_YEAR, tm->tm_year); 89 static int lpc24xx_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 113 struct rtc_time *tm = &wkalrm->time; local 133 struct rtc_time *tm = &wkalrm->time; local [all...] |
H A D | rtc-rp5c01.c | 93 static int rp5c01_read_time(struct device *dev, struct rtc_time *tm) argument 100 tm->tm_sec = rp5c01_read(priv, RP5C01_10_SECOND) * 10 + 102 tm->tm_min = rp5c01_read(priv, RP5C01_10_MINUTE) * 10 + 104 tm->tm_hour = rp5c01_read(priv, RP5C01_10_HOUR) * 10 + 106 tm->tm_mday = rp5c01_read(priv, RP5C01_10_DAY) * 10 + 108 tm->tm_wday = rp5c01_read(priv, RP5C01_DAY_OF_WEEK); 109 tm->tm_mon = rp5c01_read(priv, RP5C01_10_MONTH) * 10 + 111 tm->tm_year = rp5c01_read(priv, RP5C01_10_YEAR) * 10 + 113 if (tm->tm_year <= 69) 114 tm 122 rp5c01_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-m48t59.c | 63 static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 74 tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); 76 tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; 77 tm->tm_mday = bcd2bin(M48T59_READ(M48T59_MDAY)); 83 tm->tm_year += 100; /* one century */ 87 tm->tm_year += 68; 90 tm->tm_wday = bcd2bin(val & 0x07); 91 tm->tm_hour = bcd2bin(M48T59_READ(M48T59_HOUR) & 0x3F); 92 tm->tm_min = bcd2bin(M48T59_READ(M48T59_MIN) & 0x7F); 93 tm 103 m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 153 struct rtc_time *tm = &alrm->time; local 197 struct rtc_time *tm = &alrm->time; local [all...] |
H A D | rtc-ntxec.c | 36 static int ntxec_read_time(struct device *dev, struct rtc_time *tm) argument 47 tm->tm_min = value >> 8; 48 tm->tm_sec = value & 0xff; 54 tm->tm_mday = value >> 8; 55 tm->tm_hour = value & 0xff; 61 tm->tm_year = (value >> 8) + 100; 62 tm->tm_mon = (value & 0xff) - 1; 73 if (tm->tm_min != value >> 8 || tm->tm_sec != (value & 0xff)) 79 static int ntxec_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-max8907.c | 57 static void regs_to_tm(u8 *regs, struct rtc_time *tm) argument 59 tm->tm_year = bcd2bin(regs[RTC_YEAR2]) * 100 + 61 tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1; 62 tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f); 63 tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07); 65 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f); 66 if (tm->tm_hour == 12) 67 tm->tm_hour = 0; 69 tm->tm_hour += 12; 71 tm 77 tm_to_regs(struct rtc_time *tm, u8 *regs) argument 93 max8907_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 109 max8907_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-em3027.c | 42 static int em3027_get_time(struct device *dev, struct rtc_time *tm) argument 69 tm->tm_sec = bcd2bin(buf[0]); 70 tm->tm_min = bcd2bin(buf[1]); 71 tm->tm_hour = bcd2bin(buf[2]); 72 tm->tm_mday = bcd2bin(buf[3]); 73 tm->tm_wday = bcd2bin(buf[4]); 74 tm->tm_mon = bcd2bin(buf[5]) - 1; 75 tm->tm_year = bcd2bin(buf[6]) + 100; 80 static int em3027_set_time(struct device *dev, struct rtc_time *tm) argument 92 buf[1] = bin2bcd(tm [all...] |
H A D | rtc-aspeed.c | 22 static int aspeed_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 38 tm->tm_mday = (reg1 >> 24) & 0x1f; 39 tm->tm_hour = (reg1 >> 16) & 0x1f; 40 tm->tm_min = (reg1 >> 8) & 0x3f; 41 tm->tm_sec = (reg1 >> 0) & 0x3f; 45 tm->tm_mon = ((reg2 >> 0) & 0x0f) - 1; 46 tm->tm_year = year + (cent * 100) - 1900; 48 dev_dbg(dev, "%s %ptR", __func__, tm); 53 static int aspeed_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 59 cent = (tm [all...] |
H A D | rtc-ds1286.c | 150 static int ds1286_read_time(struct device *dev, struct rtc_time *tm) argument 181 tm->tm_sec = ds1286_rtc_read(priv, RTC_SECONDS); 182 tm->tm_min = ds1286_rtc_read(priv, RTC_MINUTES); 183 tm->tm_hour = ds1286_rtc_read(priv, RTC_HOURS) & 0x3f; 184 tm->tm_mday = ds1286_rtc_read(priv, RTC_DATE); 185 tm->tm_mon = ds1286_rtc_read(priv, RTC_MONTH) & 0x1f; 186 tm->tm_year = ds1286_rtc_read(priv, RTC_YEAR); 191 tm->tm_sec = bcd2bin(tm->tm_sec); 192 tm 213 ds1286_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-rs5c313.c | 213 static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 239 tm->tm_sec = bcd2bin(data); 243 tm->tm_min = bcd2bin(data); 247 tm->tm_hour = bcd2bin(data); 251 tm->tm_mday = bcd2bin(data); 255 tm->tm_mon = bcd2bin(data) - 1; 259 tm->tm_year = bcd2bin(data); 261 if (tm->tm_year < 70) 262 tm->tm_year += 100; 265 tm 273 rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 333 struct rtc_time tm; local [all...] |
H A D | rtc-max8925.c | 82 static int tm_calc(struct rtc_time *tm, unsigned char *buf, int len) argument 86 tm->tm_year = (buf[RTC_YEAR2] >> 4) * 1000 90 tm->tm_year -= 1900; 91 tm->tm_mon = ((buf[RTC_MONTH] >> 4) & 0x01) * 10 93 tm->tm_mday = ((buf[RTC_DATE] >> 4) & 0x03) * 10 95 tm->tm_wday = buf[RTC_WEEKDAY] & 0x07; 97 tm->tm_hour = ((buf[RTC_HOUR] >> 4) & 0x1) * 10 100 tm->tm_hour += 12; 102 tm->tm_hour = ((buf[RTC_HOUR] >> 4) & 0x03) * 10 104 tm 111 data_calc(unsigned char *buf, struct rtc_time *tm, int len) argument 151 max8925_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 165 max8925_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-lp8788.c | 109 static int lp8788_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 122 tm->tm_sec = data[LPTIME_SEC]; 123 tm->tm_min = data[LPTIME_MIN]; 124 tm->tm_hour = data[LPTIME_HOUR]; 125 tm->tm_mday = data[LPTIME_MDAY]; 126 tm->tm_mon = data[LPTIME_MON] - LP8788_MONTH_OFFSET; 127 tm->tm_year = data[LPTIME_YEAR] + LP8788_BASE_YEAR - 1900; 128 tm->tm_wday = _to_tm_wday(data[LPTIME_WDAY]); 133 static int lp8788_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 140 year = tm 167 struct rtc_time *tm = &alarm->time; local 192 struct rtc_time *tm = &alarm->time; local [all...] |
H A D | rtc-m48t86.c | 67 static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 75 tm->tm_sec = m48t86_readb(dev, M48T86_SEC); 76 tm->tm_min = m48t86_readb(dev, M48T86_MIN); 77 tm->tm_hour = m48t86_readb(dev, M48T86_HOUR) & 0x3f; 78 tm->tm_mday = m48t86_readb(dev, M48T86_DOM); 80 tm->tm_mon = m48t86_readb(dev, M48T86_MONTH) - 1; 81 tm->tm_year = m48t86_readb(dev, M48T86_YEAR) + 100; 82 tm->tm_wday = m48t86_readb(dev, M48T86_DOW); 85 tm->tm_sec = bcd2bin(m48t86_readb(dev, M48T86_SEC)); 86 tm 104 m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-spear.c | 170 static void tm2bcd(struct rtc_time *tm) argument 172 tm->tm_sec = bin2bcd(tm->tm_sec); 173 tm->tm_min = bin2bcd(tm->tm_min); 174 tm->tm_hour = bin2bcd(tm->tm_hour); 175 tm->tm_mday = bin2bcd(tm->tm_mday); 176 tm 180 bcd2tm(struct rtc_time *tm) argument 199 spear_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 230 spear_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-mt6397.c | 63 struct rtc_time *tm, int *sec) 74 tm->tm_sec = data[RTC_OFFSET_SEC]; 75 tm->tm_min = data[RTC_OFFSET_MIN]; 76 tm->tm_hour = data[RTC_OFFSET_HOUR]; 77 tm->tm_mday = data[RTC_OFFSET_DOM]; 78 tm->tm_mon = data[RTC_OFFSET_MTH] & RTC_TC_MTH_MASK; 79 tm->tm_year = data[RTC_OFFSET_YEAR]; 87 static int mtk_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 94 ret = __mtk_rtc_read_time(rtc, tm, &sec); 97 } while (sec < tm 62 __mtk_rtc_read_time(struct mt6397_rtc *rtc, struct rtc_time *tm, int *sec) argument 119 mtk_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 151 struct rtc_time *tm = &alm->time; local 192 struct rtc_time *tm = &alm->time; local [all...] |
H A D | rtc-rs5c348.c | 59 rs5c348_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 85 txp[RS5C348_REG_SECS] = bin2bcd(tm->tm_sec); 86 txp[RS5C348_REG_MINS] = bin2bcd(tm->tm_min); 88 txp[RS5C348_REG_HOURS] = bin2bcd(tm->tm_hour); 91 txp[RS5C348_REG_HOURS] = bin2bcd((tm->tm_hour + 11) % 12 + 1) | 92 (tm->tm_hour >= 12 ? RS5C348_BIT_PM : 0); 94 txp[RS5C348_REG_WDAY] = bin2bcd(tm->tm_wday); 95 txp[RS5C348_REG_DAY] = bin2bcd(tm->tm_mday); 96 txp[RS5C348_REG_MONTH] = bin2bcd(tm->tm_mon + 1) | 97 (tm 106 rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm) argument [all...] |
/linux-master/arch/alpha/kernel/ |
H A D | rtc.c | 81 alpha_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 83 int ret = mc146818_get_time(tm, 10); 94 int year = tm->tm_year; 102 tm->tm_year = year; 109 alpha_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 114 xtm = *tm; 116 tm = &xtm; 119 return mc146818_set_time(tm); 154 struct rtc_time *tm; member in union:remote_data 162 x->retval = alpha_rtc_read_time(NULL, x->tm); 166 remote_read_time(struct device *dev, struct rtc_time *tm) argument 185 remote_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
/linux-master/arch/mips/sibyte/swarm/ |
H A D | rtc_m41t81.c | 141 struct rtc_time tm; local 145 rtc_time64_to_tm(t, &tm); 154 tm.tm_sec = bin2bcd(tm.tm_sec); 155 m41t81_write(M41T81REG_SC, tm.tm_sec); 157 tm.tm_min = bin2bcd(tm.tm_min); 158 m41t81_write(M41T81REG_MN, tm.tm_min); 160 tm.tm_hour = bin2bcd(tm [all...] |
H A D | rtc_xicor1241.c | 110 struct rtc_time tm; local 114 rtc_time64_to_tm(t, &tm); 115 tm.tm_year += 1900; 123 tm.tm_sec = bin2bcd(tm.tm_sec); 124 xicor_write(X1241REG_SC, tm.tm_sec); 126 tm.tm_min = bin2bcd(tm.tm_min); 127 xicor_write(X1241REG_MN, tm.tm_min); 129 tm [all...] |
/linux-master/fs/udf/ |
H A D | udftime.c | 68 struct tm tm; local 75 time64_to_tm(seconds, 0, &tm); 76 dest->year = cpu_to_le16(tm.tm_year + 1900); 77 dest->month = tm.tm_mon + 1; 78 dest->day = tm.tm_mday; 79 dest->hour = tm.tm_hour; 80 dest->minute = tm.tm_min; 81 dest->second = tm.tm_sec;
|
/linux-master/drivers/isdn/mISDN/ |
H A D | tei.c | 221 struct teimgr *tm = fi->userdata; local 234 tm->l2->sapi, tm->l2->tei, &vaf); 458 struct teimgr *tm = fi->userdata; local 460 if (tm->l2->tei != GROUP_TEI) { 461 tm->tei_m.printdebug(&tm->tei_m, 463 tm->l2->tei); 466 tm->ri = random_ri(); 468 tm 479 struct teimgr *tm = fi->userdata; local 508 struct teimgr *tm = fi->userdata; local 533 struct teimgr *tm = fi->userdata; local 549 struct teimgr *tm = fi->userdata; local 567 struct teimgr *tm = fi->userdata; local 585 struct teimgr *tm = fi->userdata; local 599 struct teimgr *tm = fi->userdata; local 618 struct teimgr *tm = fi->userdata; local 662 struct teimgr *tm = fi->userdata; local 682 struct teimgr *tm = fi->userdata; local 697 struct teimgr *tm = fi->userdata; local 711 struct teimgr *tm = fi->userdata; local 726 struct teimgr *tm = fi->userdata; local 761 tei_ph_data_ind(struct teimgr *tm, u_int mt, u_char *dp, int len) argument 936 struct teimgr *tm = l2->tm; local 971 struct teimgr *tm = l2->tm; local [all...] |
/linux-master/sound/core/seq/ |
H A D | seq_timer.h | 83 static inline void snd_seq_sanity_real_time(snd_seq_real_time_t *tm) argument 85 while (tm->tv_nsec >= 1000000000) { 87 tm->tv_nsec -= 1000000000; 88 tm->tv_sec++; 94 static inline void snd_seq_inc_real_time(snd_seq_real_time_t *tm, snd_seq_real_time_t *inc) argument 96 tm->tv_sec += inc->tv_sec; 97 tm->tv_nsec += inc->tv_nsec; 98 snd_seq_sanity_real_time(tm); 101 static inline void snd_seq_inc_time_nsec(snd_seq_real_time_t *tm, unsigned long nsec) argument 103 tm [all...] |
/linux-master/tools/testing/selftests/rtc/ |
H A D | rtctest.c | 59 struct tm tm_time = { 196 struct rtc_time tm; local 205 rc = ioctl(self->fd, RTC_RD_TIME, &tm); 208 secs = timegm((struct tm *)&tm) + ALARM_DELTA; 209 gmtime_r(&secs, (struct tm *)&tm); 211 rc = ioctl(self->fd, RTC_ALM_SET, &tm); 218 rc = ioctl(self->fd, RTC_ALM_READ, &tm); 222 tm 253 struct rtc_time tm; local 306 struct rtc_time tm; variable in typeref:struct:rtc_time 363 struct rtc_time tm; variable in typeref:struct:rtc_time [all...] |
/linux-master/drivers/acpi/ |
H A D | prmt.c | 98 struct prm_module_info *tm; local 106 module_info_size = struct_size(tm, handlers, module_info->handler_info_count); 107 tm = kmalloc(module_info_size, GFP_KERNEL); 108 if (!tm) 111 guid_copy(&tm->guid, (guid_t *) module_info->module_guid); 112 tm->major_rev = module_info->major_rev; 113 tm->minor_rev = module_info->minor_rev; 114 tm->handler_count = module_info->handler_info_count; 115 tm->updatable = true; 126 mmio_range_size = struct_size(tm [all...] |