Lines Matching refs:txrx_buf

50 	u8 txrx_buf[9];	/* cmd + 8 registers */  member
77 chip->txrx_buf[0] = address & 0x7f; in ds1390_get_reg()
79 status = spi_write_then_read(spi, chip->txrx_buf, 1, chip->txrx_buf, 1); in ds1390_get_reg()
83 *data = chip->txrx_buf[0]; in ds1390_get_reg()
134 chip->txrx_buf[0] = DS1390_REG_SECONDS; in ds1390_read_time()
137 status = spi_write_then_read(spi, chip->txrx_buf, 1, chip->txrx_buf, 8); in ds1390_read_time()
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()
162 chip->txrx_buf[0] = DS1390_REG_SECONDS | 0x80; in ds1390_set_time()
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()
170 chip->txrx_buf[7] = bin2bcd(dt->tm_year % 100); in ds1390_set_time()
173 return spi_write_then_read(spi, chip->txrx_buf, 8, NULL, 0); in ds1390_set_time()