Lines Matching full:dt
117 "Unsupported ohm value %02ux in dt\n", ohms); in ds1390_trickle_of_init()
127 static int ds1390_read_time(struct device *dev, struct rtc_time *dt) in ds1390_read_time() argument
143 dt->tm_sec = bcd2bin(chip->txrx_buf[0]); in ds1390_read_time()
144 dt->tm_min = bcd2bin(chip->txrx_buf[1]); in ds1390_read_time()
145 dt->tm_hour = bcd2bin(chip->txrx_buf[2]); in ds1390_read_time()
146 dt->tm_wday = bcd2bin(chip->txrx_buf[3]); in ds1390_read_time()
147 dt->tm_mday = bcd2bin(chip->txrx_buf[4]); in ds1390_read_time()
149 dt->tm_mon = bcd2bin(chip->txrx_buf[5] & 0x7f) - 1; in ds1390_read_time()
151 dt->tm_year = bcd2bin(chip->txrx_buf[6]) + ((chip->txrx_buf[5] & 0x80) ? 100 : 0); in ds1390_read_time()
156 static int ds1390_set_time(struct device *dev, struct rtc_time *dt) in ds1390_set_time() argument
163 chip->txrx_buf[1] = bin2bcd(dt->tm_sec); in ds1390_set_time()
164 chip->txrx_buf[2] = bin2bcd(dt->tm_min); in ds1390_set_time()
165 chip->txrx_buf[3] = bin2bcd(dt->tm_hour); in ds1390_set_time()
166 chip->txrx_buf[4] = bin2bcd(dt->tm_wday); in ds1390_set_time()
167 chip->txrx_buf[5] = bin2bcd(dt->tm_mday); in ds1390_set_time()
168 chip->txrx_buf[6] = bin2bcd(dt->tm_mon + 1) | in ds1390_set_time()
169 ((dt->tm_year > 99) ? 0x80 : 0x00); in ds1390_set_time()
170 chip->txrx_buf[7] = bin2bcd(dt->tm_year % 100); in ds1390_set_time()