Lines Matching refs:rn
416 struct w1_reg_num *rn) in w1_atoreg_num() argument
440 rn->family = family; in w1_atoreg_num()
441 rn->id = id; in w1_atoreg_num()
443 rn64_le = cpu_to_le64(*(u64 *)rn); in w1_atoreg_num()
444 rn->crc = w1_calc_crc8((u8 *)&rn64_le, 7); in w1_atoreg_num()
448 rn->family, (unsigned long long)rn->id, rn->crc); in w1_atoreg_num()
458 struct w1_reg_num *rn) in w1_slave_search_device() argument
463 if (sl->reg_num.family == rn->family && in w1_slave_search_device()
464 sl->reg_num.id == rn->id && in w1_slave_search_device()
465 sl->reg_num.crc == rn->crc) { in w1_slave_search_device()
479 struct w1_reg_num rn; in w1_master_attribute_store_add() local
483 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_add()
487 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_add()
496 w1_attach_slave_device(md, &rn); in w1_master_attribute_store_add()
517 struct w1_reg_num rn; in w1_master_attribute_store_remove() local
521 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_remove()
525 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_remove()
532 dev_info(dev, "Device %02x-%012llx doesn't exists\n", rn.family, in w1_master_attribute_store_remove()
533 (unsigned long long)rn.id); in w1_master_attribute_store_remove()
717 int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) in w1_attach_slave_device() argument
738 memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); in w1_attach_slave_device()
744 request_module("w1-family-0x%02x", rn->family); in w1_attach_slave_device()
748 f = w1_family_registered(rn->family); in w1_attach_slave_device()
752 rn->family, rn->family, in w1_attach_slave_device()
753 (unsigned long long)rn->id, rn->crc); in w1_attach_slave_device()
773 memcpy(msg.id.id, rn, sizeof(msg.id)); in w1_attach_slave_device()
892 struct w1_reg_num rn; in w1_reconnect_slaves() local
895 memcpy(&rn, &sl->reg_num, sizeof(rn)); in w1_reconnect_slaves()
900 w1_attach_slave_device(dev, &rn); in w1_reconnect_slaves()
912 void w1_slave_found(struct w1_master *dev, u64 rn) in w1_slave_found() argument
916 u64 rn_le = cpu_to_le64(rn); in w1_slave_found()
920 tmp = (struct w1_reg_num *) &rn; in w1_slave_found()
926 if (rn && tmp->crc == w1_calc_crc8((u8 *)&rn_le, 7)) in w1_slave_found()
952 u64 last_rn, rn, tmp64; in w1_search() local
959 rn = dev->search_id; in w1_search()
967 last_rn = rn; in w1_search()
968 rn = 0; in w1_search()
987 rv = w1_read_block(dev, (u8 *)&rn, 8); in w1_search()
990 if (rv == 8 && rn) in w1_search()
991 cb(dev, rn); in w1_search()
1020 rn |= (tmp64 << i); in w1_search()
1035 dev->search_id = rn; in w1_search()
1038 cb(dev, rn); in w1_search()