Lines Matching full:rom

163 	int		(*convert)(u8 rom[9]);
173 * @rom: ROM device id (64bit Lasered ROM code + 1 CRC byte)
185 uint8_t rom[9]; member
197 * @rom: read device data (8 data bytes + 1 CRC byte)
198 * @crc: computed crc from rom
202 u8 rom[9]; member
213 * Resets the bus and select the slave by sending a ROM MATCH cmd
215 * it sent a SKIP ROM command if only one device is on the line.
287 * Send a SKIP ROM follow by a CONVERT T command on the bus.
649 info.rom[4] &= ~W1_THERM_RESOLUTION_MASK; in w1_DS18B20_set_resolution()
650 info.rom[4] |= val; in w1_DS18B20_set_resolution()
653 ret = w1_DS18B20_write_data(sl, info.rom + 2); in w1_DS18B20_set_resolution()
666 if ((info2.rom[4] & W1_THERM_RESOLUTION_MASK) == (info.rom[4] & W1_THERM_RESOLUTION_MASK)) in w1_DS18B20_set_resolution()
684 resolution = ((info.rom[4] & W1_THERM_RESOLUTION_MASK) >> W1_THERM_RESOLUTION_SHIFT) in w1_DS18B20_get_resolution()
699 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
705 static inline int w1_DS18B20_convert_temp(u8 rom[9]) in w1_DS18B20_convert_temp()
711 bv = le16_to_cpup((__le16 *)rom); in w1_DS18B20_convert_temp()
714 if (rom[4] & 0x80) { in w1_DS18B20_convert_temp()
717 bv = (bv << 2) | (rom[4] & 3); in w1_DS18B20_convert_temp()
727 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
733 static inline int w1_DS18S20_convert_temp(u8 rom[9]) in w1_DS18S20_convert_temp()
737 if (!rom[7]) { in w1_DS18S20_convert_temp()
742 if (rom[1] == 0) in w1_DS18S20_convert_temp()
743 t = ((s32)rom[0] >> 1)*1000; in w1_DS18S20_convert_temp()
745 t = 1000*(-1*(s32)(0x100-rom[0]) >> 1); in w1_DS18S20_convert_temp()
748 h = 1000*((s32)rom[7] - (s32)rom[6]); in w1_DS18S20_convert_temp()
749 h /= (s32)rom[7]; in w1_DS18S20_convert_temp()
757 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
765 static inline int w1_DS1825_convert_temp(u8 rom[9]) in w1_DS1825_convert_temp()
771 bv = le16_to_cpup((__le16 *)rom); in w1_DS1825_convert_temp()
774 if (rom[4] & 0x80) { in w1_DS1825_convert_temp()
943 * @rom: read value on the slave device RAM
949 static inline int temperature_from_RAM(struct w1_slave *sl, u8 rom[9]) in temperature_from_RAM()
952 return SLAVE_SPECIFIC_FUNC(sl)->convert(rom); in temperature_from_RAM()
1138 memset(info->rom, 0, sizeof(info->rom)); in convert_t()
1188 (info->rom[6] == 0xC) && in convert_t()
1189 ((info->rom[1] == 0x5 && info->rom[0] == 0x50) || in convert_t()
1190 (info->rom[1] == 0x7 && info->rom[0] == 0xFF)) in convert_t()
1233 memset(info->rom, 0, sizeof(info->rom)); in conv_time_measure()
1293 memset(info->rom, 0, sizeof(info->rom)); in read_scratchpad()
1310 nb_bytes_read = w1_read_block(dev_master, info->rom, 9); in read_scratchpad()
1318 info->crc = w1_calc_crc8(info->rom, 8); in read_scratchpad()
1320 if (info->rom[8] == info->crc) { in read_scratchpad()
1620 c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", info.rom[i]); in w1_slave_show()
1625 memcpy(family_data, info.rom, sizeof(info.rom)); in w1_slave_show()
1634 temperature_from_RAM(sl, info.rom)); in w1_slave_show()
1715 return sprintf(buf, "%d\n", temperature_from_RAM(sl, info.rom)); in temperature_show()
1832 th = scratchpad.rom[2]; /* TH is byte 2 */ in alarms_show()
1833 tl = scratchpad.rom[3]; /* TL is byte 3 */ in alarms_show()
1913 new_config_register[2] = info.rom[4];/* Byte 4 */ in alarms_store()
2094 *val = temperature_from_RAM(sl, info.rom); in w1_read_temp()