Lines Matching defs: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];
649 info.rom[4] &= ~W1_THERM_RESOLUTION_MASK;
650 info.rom[4] |= val;
653 ret = w1_DS18B20_write_data(sl, info.rom + 2);
666 if ((info2.rom[4] & W1_THERM_RESOLUTION_MASK) == (info.rom[4] & W1_THERM_RESOLUTION_MASK))
684 resolution = ((info.rom[4] & W1_THERM_RESOLUTION_MASK) >> W1_THERM_RESOLUTION_SHIFT)
699 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
705 static inline int w1_DS18B20_convert_temp(u8 rom[9])
711 bv = le16_to_cpup((__le16 *)rom);
714 if (rom[4] & 0x80) {
717 bv = (bv << 2) | (rom[4] & 3);
727 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
733 static inline int w1_DS18S20_convert_temp(u8 rom[9])
737 if (!rom[7]) {
742 if (rom[1] == 0)
743 t = ((s32)rom[0] >> 1)*1000;
745 t = 1000*(-1*(s32)(0x100-rom[0]) >> 1);
748 h = 1000*((s32)rom[7] - (s32)rom[6]);
749 h /= (s32)rom[7];
757 * @rom: data read from device RAM (8 data bytes + 1 CRC byte)
765 static inline int w1_DS1825_convert_temp(u8 rom[9])
771 bv = le16_to_cpup((__le16 *)rom);
774 if (rom[4] & 0x80) {
943 * @rom: read value on the slave device RAM
949 static inline int temperature_from_RAM(struct w1_slave *sl, u8 rom[9])
952 return SLAVE_SPECIFIC_FUNC(sl)->convert(rom);
1138 memset(info->rom, 0, sizeof(info->rom));
1188 (info->rom[6] == 0xC) &&
1189 ((info->rom[1] == 0x5 && info->rom[0] == 0x50) ||
1190 (info->rom[1] == 0x7 && info->rom[0] == 0xFF))
1233 memset(info->rom, 0, sizeof(info->rom));
1293 memset(info->rom, 0, sizeof(info->rom));
1310 nb_bytes_read = w1_read_block(dev_master, info->rom, 9);
1318 info->crc = w1_calc_crc8(info->rom, 8);
1320 if (info->rom[8] == info->crc) {
1620 c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", info.rom[i]);
1625 memcpy(family_data, info.rom, sizeof(info.rom));
1634 temperature_from_RAM(sl, info.rom));
1715 return sprintf(buf, "%d\n", temperature_from_RAM(sl, info.rom));
1832 th = scratchpad.rom[2]; /* TH is byte 2 */
1833 tl = scratchpad.rom[3]; /* TL is byte 3 */
1913 new_config_register[2] = info.rom[4];/* Byte 4 */
2094 *val = temperature_from_RAM(sl, info.rom);