Lines Matching refs:rn
401 struct w1_reg_num *rn) in w1_atoreg_num() argument
425 rn->family = family; in w1_atoreg_num()
426 rn->id = id; in w1_atoreg_num()
428 rn64_le = cpu_to_le64(*(u64 *)rn); in w1_atoreg_num()
429 rn->crc = w1_calc_crc8((u8 *)&rn64_le, 7); in w1_atoreg_num()
433 rn->family, (unsigned long long)rn->id, rn->crc); in w1_atoreg_num()
443 struct w1_reg_num *rn) in w1_slave_search_device() argument
448 if (sl->reg_num.family == rn->family && in w1_slave_search_device()
449 sl->reg_num.id == rn->id && in w1_slave_search_device()
450 sl->reg_num.crc == rn->crc) { in w1_slave_search_device()
464 struct w1_reg_num rn; in w1_master_attribute_store_add() local
468 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_add()
472 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_add()
481 w1_attach_slave_device(md, &rn); in w1_master_attribute_store_add()
502 struct w1_reg_num rn; in w1_master_attribute_store_remove() local
506 if (w1_atoreg_num(dev, buf, count, &rn)) in w1_master_attribute_store_remove()
510 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_remove()
517 dev_info(dev, "Device %02x-%012llx doesn't exists\n", rn.family, in w1_master_attribute_store_remove()
518 (unsigned long long)rn.id); in w1_master_attribute_store_remove()
720 int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) in w1_attach_slave_device() argument
741 memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); in w1_attach_slave_device()
746 rn->family, (unsigned long long)rn->id, rn->crc); in w1_attach_slave_device()
750 request_module("w1-family-0x%02X", rn->family); in w1_attach_slave_device()
754 f = w1_family_registered(rn->family); in w1_attach_slave_device()
758 rn->family, rn->family, in w1_attach_slave_device()
759 (unsigned long long)rn->id, rn->crc); in w1_attach_slave_device()
779 memcpy(msg.id.id, rn, sizeof(msg.id)); in w1_attach_slave_device()
898 struct w1_reg_num rn; in w1_reconnect_slaves() local
901 memcpy(&rn, &sl->reg_num, sizeof(rn)); in w1_reconnect_slaves()
906 w1_attach_slave_device(dev, &rn); in w1_reconnect_slaves()
918 static int w1_addr_crc_is_valid(struct w1_master *dev, u64 rn) in w1_addr_crc_is_valid() argument
920 u64 rn_le = cpu_to_le64(rn); in w1_addr_crc_is_valid()
921 struct w1_reg_num *tmp = (struct w1_reg_num *)&rn; in w1_addr_crc_is_valid()
952 void w1_slave_found(struct w1_master *dev, u64 rn) in w1_slave_found() argument
959 tmp = (struct w1_reg_num *) &rn; in w1_slave_found()
965 if (rn && w1_addr_crc_is_valid(dev, rn)) in w1_slave_found()
991 u64 last_rn, rn, tmp64; in w1_search() local
998 rn = dev->search_id; in w1_search()
1006 last_rn = rn; in w1_search()
1007 rn = 0; in w1_search()
1026 rv = w1_read_block(dev, (u8 *)&rn, 8); in w1_search()
1029 if (rv == 8 && rn) in w1_search()
1030 cb(dev, rn); in w1_search()
1059 rn |= (tmp64 << i); in w1_search()
1074 dev->search_id = rn; in w1_search()
1077 cb(dev, rn); in w1_search()