Lines Matching refs:rn
399 struct w1_reg_num *rn) in w1_atoreg_num() argument
423 rn->family = family; in w1_atoreg_num()
424 rn->id = id; in w1_atoreg_num()
426 rn64_le = cpu_to_le64(*(u64 *)rn); in w1_atoreg_num()
427 rn->crc = w1_calc_crc8((u8 *)&rn64_le, 7); in w1_atoreg_num()
431 rn->family, (unsigned long long)rn->id, rn->crc); in w1_atoreg_num()
441 struct w1_reg_num *rn) in w1_slave_search_device() argument
446 if (sl->reg_num.family == rn->family && in w1_slave_search_device()
447 sl->reg_num.id == rn->id && in w1_slave_search_device()
448 sl->reg_num.crc == rn->crc) { in w1_slave_search_device()
462 struct w1_reg_num rn; in w1_master_attribute_store_add() local
466 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_add()
470 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_add()
479 w1_attach_slave_device(md, &rn); in w1_master_attribute_store_add()
500 struct w1_reg_num rn; in w1_master_attribute_store_remove() local
504 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_remove()
508 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_remove()
515 dev_info(dev, "Device %02x-%012llx doesn't exists\n", rn.family, in w1_master_attribute_store_remove()
516 (unsigned long long)rn.id); in w1_master_attribute_store_remove()
718 int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) in w1_attach_slave_device() argument
739 memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); in w1_attach_slave_device()
744 rn->family, (unsigned long long)rn->id, rn->crc); in w1_attach_slave_device()
748 request_module("w1-family-0x%02X", rn->family); in w1_attach_slave_device()
752 f = w1_family_registered(rn->family); in w1_attach_slave_device()
756 rn->family, rn->family, in w1_attach_slave_device()
757 (unsigned long long)rn->id, rn->crc); in w1_attach_slave_device()
777 memcpy(msg.id.id, rn, sizeof(msg.id)); in w1_attach_slave_device()
896 struct w1_reg_num rn; in w1_reconnect_slaves() local
899 memcpy(&rn, &sl->reg_num, sizeof(rn)); in w1_reconnect_slaves()
904 w1_attach_slave_device(dev, &rn); in w1_reconnect_slaves()
916 void w1_slave_found(struct w1_master *dev, u64 rn) in w1_slave_found() argument
920 u64 rn_le = cpu_to_le64(rn); in w1_slave_found()
924 tmp = (struct w1_reg_num *) &rn; in w1_slave_found()
930 if (rn && tmp->crc == w1_calc_crc8((u8 *)&rn_le, 7)) in w1_slave_found()
956 u64 last_rn, rn, tmp64; in w1_search() local
963 rn = dev->search_id; in w1_search()
971 last_rn = rn; in w1_search()
972 rn = 0; in w1_search()
991 rv = w1_read_block(dev, (u8 *)&rn, 8); in w1_search()
994 if (rv == 8 && rn) in w1_search()
995 cb(dev, rn); in w1_search()
1024 rn |= (tmp64 << i); in w1_search()
1039 dev->search_id = rn; in w1_search()
1042 cb(dev, rn); in w1_search()