Lines Matching full:rom
45 uint8_t rom[9]; member
50 u8 rom[9]; member
200 int (*convert)(u8 rom[9]);
213 static inline int w1_DS18B20_convert_temp(u8 rom[9]);
214 static inline int w1_DS18S20_convert_temp(u8 rom[9]);
253 u8 rom[9], external_power; in w1_therm_eeprom() local
269 memset(rom, 0, sizeof(rom)); in w1_therm_eeprom()
332 u8 rom[9], crc; in w1_DS18B20_precision() local
356 memset(rom, 0, sizeof(rom)); in w1_DS18B20_precision()
383 count = w1_read_block(dev, rom, 9); in w1_DS18B20_precision()
387 crc = w1_calc_crc8(rom, 8); in w1_DS18B20_precision()
388 if (rom[8] == crc) { in w1_DS18B20_precision()
389 rom[4] = (rom[4] & ~mask) | (precision_bits & mask); in w1_DS18B20_precision()
393 w1_write_8(dev, rom[2]); in w1_DS18B20_precision()
394 w1_write_8(dev, rom[3]); in w1_DS18B20_precision()
395 w1_write_8(dev, rom[4]); in w1_DS18B20_precision()
410 static inline int w1_DS18B20_convert_temp(u8 rom[9]) in w1_DS18B20_convert_temp()
412 s16 t = le16_to_cpup((__le16 *)rom); in w1_DS18B20_convert_temp()
417 static inline int w1_DS18S20_convert_temp(u8 rom[9]) in w1_DS18S20_convert_temp()
421 if (!rom[7]) in w1_DS18S20_convert_temp()
424 if (rom[1] == 0) in w1_DS18S20_convert_temp()
425 t = ((s32)rom[0] >> 1)*1000; in w1_DS18S20_convert_temp()
427 t = 1000*(-1*(s32)(0x100-rom[0]) >> 1); in w1_DS18S20_convert_temp()
430 h = 1000*((s32)rom[7] - (s32)rom[6]); in w1_DS18S20_convert_temp()
431 h /= (s32)rom[7]; in w1_DS18S20_convert_temp()
437 static inline int w1_convert_temp(u8 rom[9], u8 fid) in w1_convert_temp()
443 return w1_therm_families[i].convert(rom); in w1_convert_temp()
493 memset(info->rom, 0, sizeof(info->rom)); in read_therm()
541 count = w1_read_block(dev, info->rom, 9); in read_therm()
548 info->crc = w1_calc_crc8(info->rom, 8); in read_therm()
550 if (info->rom[8] == info->crc) in read_therm()
582 c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", info.rom[i]); in w1_slave_show()
586 memcpy(family_data, info.rom, sizeof(info.rom)); in w1_slave_show()
595 w1_convert_temp(info.rom, fid)); in w1_slave_show()
620 *val = w1_convert_temp(info.rom, fid); in w1_read_temp()