/drivers/rtc/ |
H A D | rtc-lib.c | 51 void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) argument 60 tm->tm_wday = (days + 4) % 7; 70 tm->tm_year = year - 1900; 71 tm->tm_yday = days + 1; 81 tm->tm_mon = month; 82 tm->tm_mday = days + 1; 84 tm->tm_hour = time / 3600; 85 time -= tm->tm_hour * 3600; 86 tm->tm_min = time / 60; 87 tm 96 rtc_valid_tm(struct rtc_time *tm) argument 114 rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) argument 125 rtc_tm_to_ktime(struct rtc_time tm) argument [all...] |
H A D | hctosys.c | 28 struct rtc_time tm; local 40 err = rtc_read_time(rtc, &tm); 48 err = rtc_valid_tm(&tm); 55 rtc_tm_to_time(&tm, &tv.tv_sec); 62 tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, 63 tm.tm_hour, tm.tm_min, tm [all...] |
H A D | rtc-tile.c | 28 static int read_rtc_time(struct device *dev, struct rtc_time *tm) argument 32 tm->tm_sec = hvtm.tm_sec; 33 tm->tm_min = hvtm.tm_min; 34 tm->tm_hour = hvtm.tm_hour; 35 tm->tm_mday = hvtm.tm_mday; 36 tm->tm_mon = hvtm.tm_mon; 37 tm->tm_year = hvtm.tm_year; 38 tm->tm_wday = 0; 39 tm->tm_yday = 0; 40 tm 52 set_rtc_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-m41t94.c | 32 static int m41t94_set_time(struct device *dev, struct rtc_time *tm) argument 39 "write", tm->tm_sec, tm->tm_min, 40 tm->tm_hour, tm->tm_mday, 41 tm->tm_mon, tm->tm_year, tm->tm_wday); 44 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); 45 buf[M41T94_REG_MINUTES] = bin2bcd(tm 59 m41t94_read_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-pcf8563.c | 186 static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) argument 211 tm->tm_sec = bcd2bin(buf[PCF8563_REG_SC] & 0x7F); 212 tm->tm_min = bcd2bin(buf[PCF8563_REG_MN] & 0x7F); 213 tm->tm_hour = bcd2bin(buf[PCF8563_REG_HR] & 0x3F); /* rtc hr 0-23 */ 214 tm->tm_mday = bcd2bin(buf[PCF8563_REG_DM] & 0x3F); 215 tm->tm_wday = buf[PCF8563_REG_DW] & 0x07; 216 tm->tm_mon = bcd2bin(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ 217 tm->tm_year = bcd2bin(buf[PCF8563_REG_YR]); 218 if (tm->tm_year < 70) 219 tm 239 pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm) argument 280 struct rtc_time tm; local 300 pcf8563_set_datetime(to_i2c_client(dev), &tm); local 314 pcf8563_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 319 pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 324 pcf8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *tm) argument 359 pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm) argument [all...] |
H A D | rtc-pcf85063.c | 46 static int pcf85063_get_datetime(struct i2c_client *client, struct rtc_time *tm) argument 70 tm->tm_sec = bcd2bin(buf[PCF85063_REG_SC] & 0x7F); 71 tm->tm_min = bcd2bin(buf[PCF85063_REG_MN] & 0x7F); 72 tm->tm_hour = bcd2bin(buf[PCF85063_REG_HR] & 0x3F); /* rtc hr 0-23 */ 73 tm->tm_mday = bcd2bin(buf[PCF85063_REG_DM] & 0x3F); 74 tm->tm_wday = buf[PCF85063_REG_DW] & 0x07; 75 tm->tm_mon = bcd2bin(buf[PCF85063_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ 76 tm->tm_year = bcd2bin(buf[PCF85063_REG_YR]); 77 if (tm->tm_year < 70) 78 tm 92 pcf85063_set_datetime(struct i2c_client *client, struct rtc_time *tm) argument 134 pcf85063_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 139 pcf85063_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-at91rm9200.c | 110 struct rtc_time *tm) 121 tm->tm_sec = bcd2bin((time & AT91_RTC_SEC) >> 0); 122 tm->tm_min = bcd2bin((time & AT91_RTC_MIN) >> 8); 123 tm->tm_hour = bcd2bin((time & AT91_RTC_HOUR) >> 16); 130 tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ 131 tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ 133 tm->tm_wday = bcd2bin((date & AT91_RTC_DAY) >> 21) - 1; /* day of the week [0-6], Sunday=0 */ 134 tm->tm_mon = bcd2bin((date & AT91_RTC_MONTH) >> 16) - 1; 135 tm->tm_mday = bcd2bin((date & AT91_RTC_DATE) >> 24); 141 static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) argument 109 at91_rtc_decodetime(unsigned int timereg, unsigned int calreg, struct rtc_time *tm) argument 157 at91_rtc_settime(struct device *dev, struct rtc_time *tm) argument 201 struct rtc_time *tm = &alrm->time; local 222 struct rtc_time tm; local [all...] |
H A D | rtc-pcf2127.c | 47 static int pcf2127_get_datetime(struct i2c_client *client, struct rtc_time *tm) argument 75 tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); 76 tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); 77 tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); /* rtc hr 0-23 */ 78 tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); 79 tm->tm_wday = buf[PCF2127_REG_DW] & 0x07; 80 tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ 81 tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]); 82 if (tm->tm_year < 70) 83 tm 100 pcf2127_set_datetime(struct i2c_client *client, struct rtc_time *tm) argument 161 pcf2127_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 166 pcf2127_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-em3027.c | 44 static int em3027_get_time(struct device *dev, struct rtc_time *tm) argument 71 tm->tm_sec = bcd2bin(buf[0]); 72 tm->tm_min = bcd2bin(buf[1]); 73 tm->tm_hour = bcd2bin(buf[2]); 74 tm->tm_mday = bcd2bin(buf[3]); 75 tm->tm_wday = bcd2bin(buf[4]); 76 tm->tm_mon = bcd2bin(buf[5]); 77 tm->tm_year = bcd2bin(buf[6]) + 100; 82 static int em3027_set_time(struct device *dev, struct rtc_time *tm) argument 94 buf[1] = bin2bcd(tm [all...] |
H A D | systohc.c | 26 struct rtc_time tm; local 30 rtc_time_to_tm(now.tv_sec, &tm); 32 rtc_time_to_tm(now.tv_sec + 1, &tm); 39 err = rtc_set_time(rtc, &tm);
|
H A D | rtc-isl12022.c | 109 static int isl12022_get_datetime(struct i2c_client *client, struct rtc_time *tm) argument 140 tm->tm_sec = bcd2bin(buf[ISL12022_REG_SC] & 0x7F); 141 tm->tm_min = bcd2bin(buf[ISL12022_REG_MN] & 0x7F); 142 tm->tm_hour = bcd2bin(buf[ISL12022_REG_HR] & 0x3F); 143 tm->tm_mday = bcd2bin(buf[ISL12022_REG_DT] & 0x3F); 144 tm->tm_wday = buf[ISL12022_REG_DW] & 0x07; 145 tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1; 146 tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100; 151 tm->tm_sec, tm 162 isl12022_set_datetime(struct i2c_client *client, struct rtc_time *tm) argument 238 isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 243 isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-msm6242.c | 123 static int msm6242_read_time(struct device *dev, struct rtc_time *tm) argument 129 tm->tm_sec = msm6242_read(priv, MSM6242_SECOND10) * 10 + 131 tm->tm_min = msm6242_read(priv, MSM6242_MINUTE10) * 10 + 133 tm->tm_hour = (msm6242_read(priv, MSM6242_HOUR10 & 3)) * 10 + 135 tm->tm_mday = msm6242_read(priv, MSM6242_DAY10) * 10 + 137 tm->tm_wday = msm6242_read(priv, MSM6242_WEEK); 138 tm->tm_mon = msm6242_read(priv, MSM6242_MONTH10) * 10 + 140 tm->tm_year = msm6242_read(priv, MSM6242_YEAR10) * 10 + 142 if (tm->tm_year <= 69) 143 tm 159 msm6242_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-moxart.c | 142 static int moxart_rtc_set_time(struct device *dev, struct rtc_time *tm) argument 150 (((tm->tm_year - 100) / 10) << 4) | 151 ((tm->tm_year - 100) % 10)); 154 (((tm->tm_mon + 1) / 10) << 4) | 155 ((tm->tm_mon + 1) % 10)); 158 ((tm->tm_mday / 10) << 4) | 159 (tm->tm_mday % 10)); 162 ((tm->tm_hour / 10) << 4) | 163 (tm->tm_hour % 10)); 166 ((tm 185 moxart_rtc_read_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-wm8350.c | 38 static int wm8350_rtc_readtime(struct device *dev, struct rtc_time *tm) argument 59 tm->tm_sec = time1[0] & WM8350_RTC_SECS_MASK; 61 tm->tm_min = (time1[0] & WM8350_RTC_MINS_MASK) 64 tm->tm_hour = time1[1] & WM8350_RTC_HRS_MASK; 66 tm->tm_wday = ((time1[1] >> WM8350_RTC_DAY_SHIFT) 69 tm->tm_mon = ((time1[2] & WM8350_RTC_MTH_MASK) 72 tm->tm_mday = (time1[2] & WM8350_RTC_DATE_MASK); 74 tm->tm_year = ((time1[3] & WM8350_RTC_YHUNDREDS_MASK) 76 tm->tm_year += time1[3] & WM8350_RTC_YUNITS_MASK; 78 tm 97 wm8350_rtc_settime(struct device *dev, struct rtc_time *tm) argument 149 struct rtc_time *tm = &alrm->time; local 253 struct rtc_time *tm = &alrm->time; local [all...] |
H A D | rtc-m41t93.c | 48 static int m41t93_set_time(struct device *dev, struct rtc_time *tm) argument 57 "write", tm->tm_sec, tm->tm_min, 58 tm->tm_hour, tm->tm_mday, 59 tm->tm_mon, tm->tm_year, tm->tm_wday); 61 if (tm->tm_year < 100) { 91 data[M41T93_REG_ST_SEC] = bin2bcd(tm 104 m41t93_get_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-rx4581.c | 102 static int rx4581_get_datetime(struct device *dev, struct rtc_time *tm) argument 158 tm->tm_sec = bcd2bin(date[RX4581_REG_SC] & 0x7F); 159 tm->tm_min = bcd2bin(date[RX4581_REG_MN] & 0x7F); 160 tm->tm_hour = bcd2bin(date[RX4581_REG_HR] & 0x3F); /* rtc hr 0-23 */ 161 tm->tm_wday = ilog2(date[RX4581_REG_DW] & 0x7F); 162 tm->tm_mday = bcd2bin(date[RX4581_REG_DM] & 0x3F); 163 tm->tm_mon = bcd2bin(date[RX4581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ 164 tm->tm_year = bcd2bin(date[RX4581_REG_YR]); 165 if (tm->tm_year < 70) 166 tm 182 rx4581_set_datetime(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-bq4802.c | 49 static int bq4802_read_time(struct device *dev, struct rtc_time *tm) argument 62 tm->tm_sec = p->read(p, 0x00); 63 tm->tm_min = p->read(p, 0x02); 64 tm->tm_hour = p->read(p, 0x04); 65 tm->tm_mday = p->read(p, 0x06); 66 tm->tm_mon = p->read(p, 0x09); 67 tm->tm_year = p->read(p, 0x0a); 68 tm->tm_wday = p->read(p, 0x08); 75 tm->tm_sec = bcd2bin(tm 92 bq4802_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-m48t86.c | 45 static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) argument 55 tm->tm_sec = ops->readbyte(M48T86_REG_SEC); 56 tm->tm_min = ops->readbyte(M48T86_REG_MIN); 57 tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; 58 tm->tm_mday = ops->readbyte(M48T86_REG_DOM); 60 tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; 61 tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; 62 tm->tm_wday = ops->readbyte(M48T86_REG_DOW); 65 tm->tm_sec = bcd2bin(ops->readbyte(M48T86_REG_SEC)); 66 tm 83 m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
H A D | rtc-generic.c | 14 static int generic_get_time(struct device *dev, struct rtc_time *tm) argument 16 unsigned int ret = get_rtc_time(tm); 21 return rtc_valid_tm(tm); 24 static int generic_set_time(struct device *dev, struct rtc_time *tm) argument 26 if (set_rtc_time(tm) < 0)
|
H A D | rtc-m48t35.c | 50 static int m48t35_read_time(struct device *dev, struct rtc_time *tm) argument 64 tm->tm_sec = readb(&priv->reg->sec); 65 tm->tm_min = readb(&priv->reg->min); 66 tm->tm_hour = readb(&priv->reg->hour); 67 tm->tm_mday = readb(&priv->reg->date); 68 tm->tm_mon = readb(&priv->reg->month); 69 tm->tm_year = readb(&priv->reg->year); 73 tm->tm_sec = bcd2bin(tm->tm_sec); 74 tm 92 m48t35_set_time(struct device *dev, struct rtc_time *tm) argument [all...] |
/drivers/md/persistent-data/ |
H A D | dm-transaction-manager.c | 44 static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) argument 50 spin_lock(&tm->lock); 51 hlist_for_each_entry(si, tm->buckets + bucket, hlist) 56 spin_unlock(&tm->lock); 65 static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) argument 74 spin_lock(&tm->lock); 75 hlist_add_head(&si->hlist, tm->buckets + bucket); 76 spin_unlock(&tm->lock); 80 static void wipe_shadow_table(struct dm_transaction_manager *tm) argument 87 spin_lock(&tm 105 struct dm_transaction_manager *tm; local 125 struct dm_transaction_manager *tm; local 137 dm_tm_destroy(struct dm_transaction_manager *tm) argument 146 dm_tm_pre_commit(struct dm_transaction_manager *tm) argument 161 dm_tm_commit(struct dm_transaction_manager *tm, struct dm_block *root) argument 173 dm_tm_new_block(struct dm_transaction_manager *tm, struct dm_block_validator *v, struct dm_block **result) argument 202 __shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, struct dm_block_validator *v, struct dm_block **result) argument 242 dm_tm_shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, struct dm_block_validator *v, struct dm_block **result, int *inc_children) argument 267 dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, struct dm_block_validator *v, struct dm_block **blk) argument 278 dm_tm_unlock(struct dm_transaction_manager *tm, struct dm_block *b) argument 284 dm_tm_inc(struct dm_transaction_manager *tm, dm_block_t b) argument 295 dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b) argument 306 dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, uint32_t *result) argument 315 dm_tm_get_bm(struct dm_transaction_manager *tm) argument 322 dm_tm_create_internal(struct dm_block_manager *bm, dm_block_t sb_location, struct dm_transaction_manager **tm, struct dm_space_map **sm, int create, void *sm_root, size_t sm_len) argument 365 dm_tm_create_with_sm(struct dm_block_manager *bm, dm_block_t sb_location, struct dm_transaction_manager **tm, struct dm_space_map **sm) argument 373 dm_tm_open_with_sm(struct dm_block_manager *bm, dm_block_t sb_location, void *sm_root, size_t root_len, struct dm_transaction_manager **tm, struct dm_space_map **sm) argument [all...] |
H A D | dm-transaction-manager.h | 24 void dm_tm_destroy(struct dm_transaction_manager *tm); 29 * You create the non-blocking variant from a normal tm. The interface is 33 * tm when you've finished with it. You may not destroy the original prior 50 int dm_tm_pre_commit(struct dm_transaction_manager *tm); 51 int dm_tm_commit(struct dm_transaction_manager *tm, struct dm_block *superblock); 65 int dm_tm_new_block(struct dm_transaction_manager *tm, 74 * this operation. Because the tm knows the scope of the transaction it 85 int dm_tm_shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, 93 int dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, 97 int dm_tm_unlock(struct dm_transaction_manager *tm, struc [all...] |
H A D | dm-space-map-disk.h | 17 * between the tm and sm. 19 struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm, 22 struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm,
|
H A D | dm-space-map-metadata.h | 25 * between the tm and sm. 33 struct dm_transaction_manager *tm, 41 struct dm_transaction_manager *tm,
|
/drivers/net/fddi/skfp/ |
H A D | smttimer.c | 42 struct smt_timer *tm ; local 51 for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { 52 if (tm == timer) { 53 *prev = tm->tm_next ; 54 if (tm->tm_next) { 55 tm->tm_next->tm_delta += tm->tm_delta ; 66 struct smt_timer *tm ; local 92 for (prev = &smc->t.st_queue ; (tm 123 struct smt_timer *tm ; local [all...] |