Lines Matching refs:rom

163 	int		(*convert)(u8 rom[9]);
173 * @rom: ROM device id (64bit Lasered ROM code + 1 CRC byte)
185 uint8_t rom[9];
197 * @rom: read device data (8 data bytes + 1 CRC byte)
198 * @crc: computed crc from rom
202 u8 rom[9];
613 info.rom[4] &= ~W1_THERM_RESOLUTION_MASK;
614 info.rom[4] |= val;
617 ret = w1_DS18B20_write_data(sl, info.rom + 2);
630 if ((info2.rom[4] & W1_THERM_RESOLUTION_MASK) == (info.rom[4] & W1_THERM_RESOLUTION_MASK))
648 resolution = ((info.rom[4] & W1_THERM_RESOLUTION_MASK) >> W1_THERM_RESOLUTION_SHIFT)
662 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
668 static inline int w1_DS18B20_convert_temp(u8 rom[9])
674 bv = le16_to_cpup((__le16 *)rom);
677 if (rom[4] & 0x80) {
680 bv = (bv << 2) | (rom[4] & 3);
690 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
696 static inline int w1_DS18S20_convert_temp(u8 rom[9])
700 if (!rom[7]) {
705 if (rom[1] == 0)
706 t = ((s32)rom[0] >> 1)*1000;
708 t = 1000*(-1*(s32)(0x100-rom[0]) >> 1);
711 h = 1000*((s32)rom[7] - (s32)rom[6]);
712 h /= (s32)rom[7];
877 * @rom: read value on the slave device RAM
883 static inline int temperature_from_RAM(struct w1_slave *sl, u8 rom[9])
886 return SLAVE_SPECIFIC_FUNC(sl)->convert(rom);
1073 memset(info->rom, 0, sizeof(info->rom));
1123 (info->rom[6] == 0xC) &&
1124 ((info->rom[1] == 0x5 && info->rom[0] == 0x50) ||
1125 (info->rom[1] == 0x7 && info->rom[0] == 0xFF))
1168 memset(info->rom, 0, sizeof(info->rom));
1228 memset(info->rom, 0, sizeof(info->rom));
1245 nb_bytes_read = w1_read_block(dev_master, info->rom, 9);
1253 info->crc = w1_calc_crc8(info->rom, 8);
1255 if (info->rom[8] == info->crc) {
1555 c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", info.rom[i]);
1560 memcpy(family_data, info.rom, sizeof(info.rom));
1569 temperature_from_RAM(sl, info.rom));
1650 return sprintf(buf, "%d\n", temperature_from_RAM(sl, info.rom));
1767 th = scratchpad.rom[2]; /* TH is byte 2 */
1768 tl = scratchpad.rom[3]; /* TL is byte 3 */
1849 new_config_register[2] = info.rom[4];/* Byte 4 */
2030 *val = temperature_from_RAM(sl, info.rom);