/drivers/md/persistent-data/ |
D | dm-transaction-manager.c | 45 static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) in is_shadow() argument 52 spin_lock(&tm->lock); in is_shadow() 53 hlist_for_each_entry(si, n, tm->buckets + bucket, hlist) in is_shadow() 58 spin_unlock(&tm->lock); in is_shadow() 67 static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) in insert_shadow() argument 76 spin_lock(&tm->lock); in insert_shadow() 77 hlist_add_head(&si->hlist, tm->buckets + bucket); in insert_shadow() 78 spin_unlock(&tm->lock); in insert_shadow() 82 static void wipe_shadow_table(struct dm_transaction_manager *tm) in wipe_shadow_table() argument 89 spin_lock(&tm->lock); in wipe_shadow_table() [all …]
|
/drivers/rtc/ |
D | rtc-at91rm9200.c | 51 struct rtc_time *tm) in at91_rtc_decodetime() argument 62 tm->tm_sec = bcd2bin((time & AT91_RTC_SEC) >> 0); in at91_rtc_decodetime() 63 tm->tm_min = bcd2bin((time & AT91_RTC_MIN) >> 8); in at91_rtc_decodetime() 64 tm->tm_hour = bcd2bin((time & AT91_RTC_HOUR) >> 16); in at91_rtc_decodetime() 71 tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ in at91_rtc_decodetime() 72 tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ in at91_rtc_decodetime() 74 tm->tm_wday = bcd2bin((date & AT91_RTC_DAY) >> 21) - 1; /* day of the week [0-6], Sunday=0 */ in at91_rtc_decodetime() 75 tm->tm_mon = bcd2bin((date & AT91_RTC_MONTH) >> 16) - 1; in at91_rtc_decodetime() 76 tm->tm_mday = bcd2bin((date & AT91_RTC_DATE) >> 24); in at91_rtc_decodetime() 82 static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) in at91_rtc_readtime() argument [all …]
|
D | rtc-lib.c | 51 void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) in rtc_time_to_tm() argument 60 tm->tm_wday = (days + 4) % 7; in rtc_time_to_tm() 70 tm->tm_year = year - 1900; in rtc_time_to_tm() 71 tm->tm_yday = days + 1; in rtc_time_to_tm() 81 tm->tm_mon = month; in rtc_time_to_tm() 82 tm->tm_mday = days + 1; in rtc_time_to_tm() 84 tm->tm_hour = time / 3600; in rtc_time_to_tm() 85 time -= tm->tm_hour * 3600; in rtc_time_to_tm() 86 tm->tm_min = time / 60; in rtc_time_to_tm() 87 tm->tm_sec = time - tm->tm_min * 60; in rtc_time_to_tm() [all …]
|
D | rtc-pcf8563.c | 73 static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) in pcf8563_get_datetime() argument 102 tm->tm_sec = bcd2bin(buf[PCF8563_REG_SC] & 0x7F); in pcf8563_get_datetime() 103 tm->tm_min = bcd2bin(buf[PCF8563_REG_MN] & 0x7F); in pcf8563_get_datetime() 104 tm->tm_hour = bcd2bin(buf[PCF8563_REG_HR] & 0x3F); /* rtc hr 0-23 */ in pcf8563_get_datetime() 105 tm->tm_mday = bcd2bin(buf[PCF8563_REG_DM] & 0x3F); in pcf8563_get_datetime() 106 tm->tm_wday = buf[PCF8563_REG_DW] & 0x07; in pcf8563_get_datetime() 107 tm->tm_mon = bcd2bin(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ in pcf8563_get_datetime() 108 tm->tm_year = bcd2bin(buf[PCF8563_REG_YR]); in pcf8563_get_datetime() 109 if (tm->tm_year < 70) in pcf8563_get_datetime() 110 tm->tm_year += 100; /* assume we are in 1970...2069 */ in pcf8563_get_datetime() [all …]
|
D | rtc-wm8350.c | 38 static int wm8350_rtc_readtime(struct device *dev, struct rtc_time *tm) in wm8350_rtc_readtime() argument 59 tm->tm_sec = time1[0] & WM8350_RTC_SECS_MASK; in wm8350_rtc_readtime() 61 tm->tm_min = (time1[0] & WM8350_RTC_MINS_MASK) in wm8350_rtc_readtime() 64 tm->tm_hour = time1[1] & WM8350_RTC_HRS_MASK; in wm8350_rtc_readtime() 66 tm->tm_wday = ((time1[1] >> WM8350_RTC_DAY_SHIFT) in wm8350_rtc_readtime() 69 tm->tm_mon = ((time1[2] & WM8350_RTC_MTH_MASK) in wm8350_rtc_readtime() 72 tm->tm_mday = (time1[2] & WM8350_RTC_DATE_MASK); in wm8350_rtc_readtime() 74 tm->tm_year = ((time1[3] & WM8350_RTC_YHUNDREDS_MASK) in wm8350_rtc_readtime() 76 tm->tm_year += time1[3] & WM8350_RTC_YUNITS_MASK; in wm8350_rtc_readtime() 78 tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, in wm8350_rtc_readtime() [all …]
|
D | rtc-m41t94.c | 32 static int m41t94_set_time(struct device *dev, struct rtc_time *tm) in m41t94_set_time() argument 39 "write", tm->tm_sec, tm->tm_min, in m41t94_set_time() 40 tm->tm_hour, tm->tm_mday, in m41t94_set_time() 41 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_set_time() 44 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); in m41t94_set_time() 45 buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); in m41t94_set_time() 46 buf[M41T94_REG_HOURS] = bin2bcd(tm->tm_hour); in m41t94_set_time() 47 buf[M41T94_REG_WDAY] = bin2bcd(tm->tm_wday + 1); in m41t94_set_time() 48 buf[M41T94_REG_DAY] = bin2bcd(tm->tm_mday); in m41t94_set_time() 49 buf[M41T94_REG_MONTH] = bin2bcd(tm->tm_mon + 1); in m41t94_set_time() [all …]
|
D | rtc-rx8581.c | 61 static int rx8581_get_datetime(struct i2c_client *client, struct rtc_time *tm) in rx8581_get_datetime() argument 115 tm->tm_sec = bcd2bin(date[RX8581_REG_SC] & 0x7F); in rx8581_get_datetime() 116 tm->tm_min = bcd2bin(date[RX8581_REG_MN] & 0x7F); in rx8581_get_datetime() 117 tm->tm_hour = bcd2bin(date[RX8581_REG_HR] & 0x3F); /* rtc hr 0-23 */ in rx8581_get_datetime() 118 tm->tm_wday = ilog2(date[RX8581_REG_DW] & 0x7F); in rx8581_get_datetime() 119 tm->tm_mday = bcd2bin(date[RX8581_REG_DM] & 0x3F); in rx8581_get_datetime() 120 tm->tm_mon = bcd2bin(date[RX8581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ in rx8581_get_datetime() 121 tm->tm_year = bcd2bin(date[RX8581_REG_YR]); in rx8581_get_datetime() 122 if (tm->tm_year < 70) in rx8581_get_datetime() 123 tm->tm_year += 100; /* assume we are in 1970...2069 */ in rx8581_get_datetime() [all …]
|
D | rtc-m41t93.c | 48 static int m41t93_set_time(struct device *dev, struct rtc_time *tm) in m41t93_set_time() argument 56 "write", tm->tm_sec, tm->tm_min, in m41t93_set_time() 57 tm->tm_hour, tm->tm_mday, in m41t93_set_time() 58 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t93_set_time() 60 if (tm->tm_year < 100) { in m41t93_set_time() 66 data[M41T93_REG_ST_SEC] = bin2bcd(tm->tm_sec); in m41t93_set_time() 67 data[M41T93_REG_MIN] = bin2bcd(tm->tm_min); in m41t93_set_time() 68 data[M41T93_REG_CENT_HOUR] = bin2bcd(tm->tm_hour) | in m41t93_set_time() 69 ((tm->tm_year/100-1) << 6); in m41t93_set_time() 70 data[M41T93_REG_DAY] = bin2bcd(tm->tm_mday); in m41t93_set_time() [all …]
|
D | rtc-m48t86.c | 45 static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) in m48t86_rtc_read_time() argument 55 tm->tm_sec = ops->readbyte(M48T86_REG_SEC); in m48t86_rtc_read_time() 56 tm->tm_min = ops->readbyte(M48T86_REG_MIN); in m48t86_rtc_read_time() 57 tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; in m48t86_rtc_read_time() 58 tm->tm_mday = ops->readbyte(M48T86_REG_DOM); in m48t86_rtc_read_time() 60 tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; in m48t86_rtc_read_time() 61 tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; in m48t86_rtc_read_time() 62 tm->tm_wday = ops->readbyte(M48T86_REG_DOW); in m48t86_rtc_read_time() 65 tm->tm_sec = bcd2bin(ops->readbyte(M48T86_REG_SEC)); in m48t86_rtc_read_time() 66 tm->tm_min = bcd2bin(ops->readbyte(M48T86_REG_MIN)); in m48t86_rtc_read_time() [all …]
|
D | rtc-omap.c | 157 static int tm2bcd(struct rtc_time *tm) in tm2bcd() argument 159 if (rtc_valid_tm(tm) != 0) in tm2bcd() 162 tm->tm_sec = bin2bcd(tm->tm_sec); in tm2bcd() 163 tm->tm_min = bin2bcd(tm->tm_min); in tm2bcd() 164 tm->tm_hour = bin2bcd(tm->tm_hour); in tm2bcd() 165 tm->tm_mday = bin2bcd(tm->tm_mday); in tm2bcd() 167 tm->tm_mon = bin2bcd(tm->tm_mon + 1); in tm2bcd() 170 if (tm->tm_year < 100 || tm->tm_year > 199) in tm2bcd() 172 tm->tm_year = bin2bcd(tm->tm_year - 100); in tm2bcd() 177 static void bcd2tm(struct rtc_time *tm) in bcd2tm() argument [all …]
|
D | rtc-isl12022.c | 106 static int isl12022_get_datetime(struct i2c_client *client, struct rtc_time *tm) in isl12022_get_datetime() argument 137 tm->tm_sec = bcd2bin(buf[ISL12022_REG_SC] & 0x7F); in isl12022_get_datetime() 138 tm->tm_min = bcd2bin(buf[ISL12022_REG_MN] & 0x7F); in isl12022_get_datetime() 139 tm->tm_hour = bcd2bin(buf[ISL12022_REG_HR] & 0x3F); in isl12022_get_datetime() 140 tm->tm_mday = bcd2bin(buf[ISL12022_REG_DT] & 0x3F); in isl12022_get_datetime() 141 tm->tm_wday = buf[ISL12022_REG_DW] & 0x07; in isl12022_get_datetime() 142 tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1; in isl12022_get_datetime() 143 tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100; in isl12022_get_datetime() 148 tm->tm_sec, tm->tm_min, tm->tm_hour, in isl12022_get_datetime() 149 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in isl12022_get_datetime() [all …]
|
D | rtc-msm6242.c | 123 static int msm6242_read_time(struct device *dev, struct rtc_time *tm) in msm6242_read_time() argument 129 tm->tm_sec = msm6242_read(priv, MSM6242_SECOND10) * 10 + in msm6242_read_time() 131 tm->tm_min = msm6242_read(priv, MSM6242_MINUTE10) * 10 + in msm6242_read_time() 133 tm->tm_hour = (msm6242_read(priv, MSM6242_HOUR10 & 3)) * 10 + in msm6242_read_time() 135 tm->tm_mday = msm6242_read(priv, MSM6242_DAY10) * 10 + in msm6242_read_time() 137 tm->tm_wday = msm6242_read(priv, MSM6242_WEEK); in msm6242_read_time() 138 tm->tm_mon = msm6242_read(priv, MSM6242_MONTH10) * 10 + in msm6242_read_time() 140 tm->tm_year = msm6242_read(priv, MSM6242_YEAR10) * 10 + in msm6242_read_time() 142 if (tm->tm_year <= 69) in msm6242_read_time() 143 tm->tm_year += 100; in msm6242_read_time() [all …]
|
D | rtc-s35390a.c | 129 static int s35390a_set_datetime(struct i2c_client *client, struct rtc_time *tm) in s35390a_set_datetime() argument 136 "mon=%d, year=%d, wday=%d\n", __func__, tm->tm_sec, in s35390a_set_datetime() 137 tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, in s35390a_set_datetime() 138 tm->tm_wday); in s35390a_set_datetime() 140 buf[S35390A_BYTE_YEAR] = bin2bcd(tm->tm_year - 100); in s35390a_set_datetime() 141 buf[S35390A_BYTE_MONTH] = bin2bcd(tm->tm_mon + 1); in s35390a_set_datetime() 142 buf[S35390A_BYTE_DAY] = bin2bcd(tm->tm_mday); in s35390a_set_datetime() 143 buf[S35390A_BYTE_WDAY] = bin2bcd(tm->tm_wday); in s35390a_set_datetime() 144 buf[S35390A_BYTE_HOURS] = s35390a_hr2reg(s35390a, tm->tm_hour); in s35390a_set_datetime() 145 buf[S35390A_BYTE_MINS] = bin2bcd(tm->tm_min); in s35390a_set_datetime() [all …]
|
D | rtc-m48t35.c | 49 static int m48t35_read_time(struct device *dev, struct rtc_time *tm) in m48t35_read_time() argument 63 tm->tm_sec = readb(&priv->reg->sec); in m48t35_read_time() 64 tm->tm_min = readb(&priv->reg->min); in m48t35_read_time() 65 tm->tm_hour = readb(&priv->reg->hour); in m48t35_read_time() 66 tm->tm_mday = readb(&priv->reg->date); in m48t35_read_time() 67 tm->tm_mon = readb(&priv->reg->month); in m48t35_read_time() 68 tm->tm_year = readb(&priv->reg->year); in m48t35_read_time() 72 tm->tm_sec = bcd2bin(tm->tm_sec); in m48t35_read_time() 73 tm->tm_min = bcd2bin(tm->tm_min); in m48t35_read_time() 74 tm->tm_hour = bcd2bin(tm->tm_hour); in m48t35_read_time() [all …]
|
D | rtc-rv3029c2.c | 142 rv3029c2_i2c_read_time(struct i2c_client *client, struct rtc_time *tm) in rv3029c2_i2c_read_time() argument 162 tm->tm_sec = bcd2bin(regs[RV3029C2_W_SEC-RV3029C2_W_SEC]); in rv3029c2_i2c_read_time() 163 tm->tm_min = bcd2bin(regs[RV3029C2_W_MINUTES-RV3029C2_W_SEC]); in rv3029c2_i2c_read_time() 170 tm->tm_hour = bcd2bin(_hr & 0x1f); in rv3029c2_i2c_read_time() 172 tm->tm_hour += 12; in rv3029c2_i2c_read_time() 174 tm->tm_hour = bcd2bin(_hr & 0x3f); in rv3029c2_i2c_read_time() 177 tm->tm_mday = bcd2bin(regs[RV3029C2_W_DATE-RV3029C2_W_SEC]); in rv3029c2_i2c_read_time() 178 tm->tm_mon = bcd2bin(regs[RV3029C2_W_MONTHS-RV3029C2_W_SEC]) - 1; in rv3029c2_i2c_read_time() 179 tm->tm_year = bcd2bin(regs[RV3029C2_W_YEARS-RV3029C2_W_SEC]) + 100; in rv3029c2_i2c_read_time() 180 tm->tm_wday = bcd2bin(regs[RV3029C2_W_DAYS-RV3029C2_W_SEC]) - 1; in rv3029c2_i2c_read_time() [all …]
|
D | rtc-m48t59.c | 68 static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) in m48t59_rtc_read_time() argument 80 tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); in m48t59_rtc_read_time() 82 tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; in m48t59_rtc_read_time() 83 tm->tm_mday = bcd2bin(M48T59_READ(M48T59_MDAY)); in m48t59_rtc_read_time() 89 tm->tm_year += 100; /* one century */ in m48t59_rtc_read_time() 93 tm->tm_year += 68; in m48t59_rtc_read_time() 96 tm->tm_wday = bcd2bin(val & 0x07); in m48t59_rtc_read_time() 97 tm->tm_hour = bcd2bin(M48T59_READ(M48T59_HOUR) & 0x3F); in m48t59_rtc_read_time() 98 tm->tm_min = bcd2bin(M48T59_READ(M48T59_MIN) & 0x7F); in m48t59_rtc_read_time() 99 tm->tm_sec = bcd2bin(M48T59_READ(M48T59_SEC) & 0x7F); in m48t59_rtc_read_time() [all …]
|
D | rtc-bq4802.c | 49 static int bq4802_read_time(struct device *dev, struct rtc_time *tm) in bq4802_read_time() argument 62 tm->tm_sec = p->read(p, 0x00); in bq4802_read_time() 63 tm->tm_min = p->read(p, 0x02); in bq4802_read_time() 64 tm->tm_hour = p->read(p, 0x04); in bq4802_read_time() 65 tm->tm_mday = p->read(p, 0x06); in bq4802_read_time() 66 tm->tm_mon = p->read(p, 0x09); in bq4802_read_time() 67 tm->tm_year = p->read(p, 0x0a); in bq4802_read_time() 68 tm->tm_wday = p->read(p, 0x08); in bq4802_read_time() 75 tm->tm_sec = bcd2bin(tm->tm_sec); in bq4802_read_time() 76 tm->tm_min = bcd2bin(tm->tm_min); in bq4802_read_time() [all …]
|
D | rtc-sh.c | 353 static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) in sh_rtc_read_time() argument 371 tm->tm_sec = bcd2bin(readb(rtc->regbase + RSECCNT)); in sh_rtc_read_time() 372 tm->tm_min = bcd2bin(readb(rtc->regbase + RMINCNT)); in sh_rtc_read_time() 373 tm->tm_hour = bcd2bin(readb(rtc->regbase + RHRCNT)); in sh_rtc_read_time() 374 tm->tm_wday = bcd2bin(readb(rtc->regbase + RWKCNT)); in sh_rtc_read_time() 375 tm->tm_mday = bcd2bin(readb(rtc->regbase + RDAYCNT)); in sh_rtc_read_time() 376 tm->tm_mon = bcd2bin(readb(rtc->regbase + RMONCNT)) - 1; in sh_rtc_read_time() 387 tm->tm_year = (yr100 * 100 + bcd2bin(yr)) - 1900; in sh_rtc_read_time() 397 tm->tm_sec--; in sh_rtc_read_time() 407 tm->tm_sec, tm->tm_min, tm->tm_hour, in sh_rtc_read_time() [all …]
|
D | rtc-ds1302.c | 140 static int ds1302_rtc_read_time(struct device *dev, struct rtc_time *tm) in ds1302_rtc_read_time() argument 142 tm->tm_sec = bcd2bin(ds1302_readbyte(RTC_ADDR_SEC)); in ds1302_rtc_read_time() 143 tm->tm_min = bcd2bin(ds1302_readbyte(RTC_ADDR_MIN)); in ds1302_rtc_read_time() 144 tm->tm_hour = bcd2bin(ds1302_readbyte(RTC_ADDR_HOUR)); in ds1302_rtc_read_time() 145 tm->tm_wday = bcd2bin(ds1302_readbyte(RTC_ADDR_DAY)); in ds1302_rtc_read_time() 146 tm->tm_mday = bcd2bin(ds1302_readbyte(RTC_ADDR_DATE)); in ds1302_rtc_read_time() 147 tm->tm_mon = bcd2bin(ds1302_readbyte(RTC_ADDR_MON)) - 1; in ds1302_rtc_read_time() 148 tm->tm_year = bcd2bin(ds1302_readbyte(RTC_ADDR_YEAR)); in ds1302_rtc_read_time() 150 if (tm->tm_year < 70) in ds1302_rtc_read_time() 151 tm->tm_year += 100; in ds1302_rtc_read_time() [all …]
|
D | rtc-pcf2123.c | 132 static int pcf2123_rtc_read_time(struct device *dev, struct rtc_time *tm) in pcf2123_rtc_read_time() argument 145 tm->tm_sec = bcd2bin(rxbuf[0] & 0x7F); in pcf2123_rtc_read_time() 146 tm->tm_min = bcd2bin(rxbuf[1] & 0x7F); in pcf2123_rtc_read_time() 147 tm->tm_hour = bcd2bin(rxbuf[2] & 0x3F); /* rtc hr 0-23 */ in pcf2123_rtc_read_time() 148 tm->tm_mday = bcd2bin(rxbuf[3] & 0x3F); in pcf2123_rtc_read_time() 149 tm->tm_wday = rxbuf[4] & 0x07; in pcf2123_rtc_read_time() 150 tm->tm_mon = bcd2bin(rxbuf[5] & 0x1F) - 1; /* rtc mn 1-12 */ in pcf2123_rtc_read_time() 151 tm->tm_year = bcd2bin(rxbuf[6]); in pcf2123_rtc_read_time() 152 if (tm->tm_year < 70) in pcf2123_rtc_read_time() 153 tm->tm_year += 100; /* assume we are in 1970...2069 */ in pcf2123_rtc_read_time() [all …]
|
D | rtc-rs5c348.c | 64 rs5c348_rtc_set_time(struct device *dev, struct rtc_time *tm) in rs5c348_rtc_set_time() argument 79 txp[RS5C348_REG_SECS] = bin2bcd(tm->tm_sec); in rs5c348_rtc_set_time() 80 txp[RS5C348_REG_MINS] = bin2bcd(tm->tm_min); in rs5c348_rtc_set_time() 82 txp[RS5C348_REG_HOURS] = bin2bcd(tm->tm_hour); in rs5c348_rtc_set_time() 85 txp[RS5C348_REG_HOURS] = bin2bcd((tm->tm_hour + 11) % 12 + 1) | in rs5c348_rtc_set_time() 86 (tm->tm_hour >= 12 ? RS5C348_BIT_PM : 0); in rs5c348_rtc_set_time() 88 txp[RS5C348_REG_WDAY] = bin2bcd(tm->tm_wday); in rs5c348_rtc_set_time() 89 txp[RS5C348_REG_DAY] = bin2bcd(tm->tm_mday); in rs5c348_rtc_set_time() 90 txp[RS5C348_REG_MONTH] = bin2bcd(tm->tm_mon + 1) | in rs5c348_rtc_set_time() 91 (tm->tm_year >= 100 ? RS5C348_BIT_Y2K : 0); in rs5c348_rtc_set_time() [all …]
|
D | rtc-tile.c | 28 static int read_rtc_time(struct device *dev, struct rtc_time *tm) in read_rtc_time() argument 32 tm->tm_sec = hvtm.tm_sec; in read_rtc_time() 33 tm->tm_min = hvtm.tm_min; in read_rtc_time() 34 tm->tm_hour = hvtm.tm_hour; in read_rtc_time() 35 tm->tm_mday = hvtm.tm_mday; in read_rtc_time() 36 tm->tm_mon = hvtm.tm_mon; in read_rtc_time() 37 tm->tm_year = hvtm.tm_year; in read_rtc_time() 38 tm->tm_wday = 0; in read_rtc_time() 39 tm->tm_yday = 0; in read_rtc_time() 40 tm->tm_isdst = 0; in read_rtc_time() [all …]
|
D | rtc-spear.c | 172 static int tm2bcd(struct rtc_time *tm) in tm2bcd() argument 174 if (rtc_valid_tm(tm) != 0) in tm2bcd() 176 tm->tm_sec = bin2bcd(tm->tm_sec); in tm2bcd() 177 tm->tm_min = bin2bcd(tm->tm_min); in tm2bcd() 178 tm->tm_hour = bin2bcd(tm->tm_hour); in tm2bcd() 179 tm->tm_mday = bin2bcd(tm->tm_mday); in tm2bcd() 180 tm->tm_mon = bin2bcd(tm->tm_mon + 1); in tm2bcd() 181 tm->tm_year = bin2bcd(tm->tm_year); in tm2bcd() 186 static void bcd2tm(struct rtc_time *tm) in bcd2tm() argument 188 tm->tm_sec = bcd2bin(tm->tm_sec); in bcd2tm() [all …]
|
/drivers/isdn/mISDN/ |
D | tei.c | 230 struct teimgr *tm = fi->userdata; in tei_debug() local 243 tm->l2->sapi, tm->l2->tei, &vaf); in tei_debug() 467 struct teimgr *tm = fi->userdata; in tei_id_request() local 469 if (tm->l2->tei != GROUP_TEI) { in tei_id_request() 470 tm->tei_m.printdebug(&tm->tei_m, in tei_id_request() 472 tm->l2->tei); in tei_id_request() 475 tm->ri = random_ri(); in tei_id_request() 477 tm->tei_m.printdebug(&tm->tei_m, in tei_id_request() 478 "assign request ri %d", tm->ri); in tei_id_request() 479 put_tei_msg(tm->mgr, ID_REQUEST, tm->ri, GROUP_TEI); in tei_id_request() [all …]
|
/drivers/net/fddi/skfp/ |
D | smttimer.c | 42 struct smt_timer *tm ; in smt_timer_stop() local 51 for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { in smt_timer_stop() 52 if (tm == timer) { in smt_timer_stop() 53 *prev = tm->tm_next ; in smt_timer_stop() 54 if (tm->tm_next) { in smt_timer_stop() 55 tm->tm_next->tm_delta += tm->tm_delta ; in smt_timer_stop() 66 struct smt_timer *tm ; in smt_timer_start() local 92 for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { in smt_timer_start() 93 if (delta + tm->tm_delta > time) { in smt_timer_start() 96 delta += tm->tm_delta ; in smt_timer_start() [all …]
|