Lines Matching refs:ret
68 int ret; in search_slave() local
77 ret = w1_reset_bus(dev); in search_slave()
78 if (ret < 0) { in search_slave()
79 return ret; in search_slave()
81 if (ret == 0) { in search_slave()
86 ret = w1_write_byte(dev, command); in search_slave()
87 if (ret < 0) { in search_slave()
88 return ret; in search_slave()
93 ret = w1_read_bit(dev); in search_slave()
94 if (ret < 0) { in search_slave()
95 return ret; in search_slave()
97 last_id_bit = (bool)ret; in search_slave()
98 ret = w1_read_bit(dev); in search_slave()
99 if (ret < 0) { in search_slave()
100 return ret; in search_slave()
102 last_complement_id_bit = (bool)ret; in search_slave()
147 ret = w1_write_bit(dev, last_id_bit); in search_slave()
148 if (ret < 0) { in search_slave()
149 return ret; in search_slave()
167 int ret; in z_impl_w1_search_bus() local
172 ret = search_slave(dev, command, family, &last_discrepancy, in z_impl_w1_search_bus()
174 if (ret < 0) { in z_impl_w1_search_bus()
175 found_cnt = ret; in z_impl_w1_search_bus()
208 int ret; in w1_read_rom() local
211 ret = w1_reset_bus(dev); in w1_read_rom()
212 if (ret == 0) { in w1_read_rom()
213 ret = -ENODEV; in w1_read_rom()
216 if (ret < 0) { in w1_read_rom()
220 ret = w1_write_byte(dev, W1_CMD_READ_ROM); in w1_read_rom()
221 if (ret < 0) { in w1_read_rom()
224 ret = w1_read_block(dev, (uint8_t *)rom, sizeof(struct w1_rom)); in w1_read_rom()
225 if (ret < 0) { in w1_read_rom()
229 ret = -EIO; in w1_read_rom()
234 return ret; in w1_read_rom()
239 int ret; in match_rom() local
248 ret = w1_reset_bus(dev); in match_rom()
249 if (ret == 0) { in match_rom()
252 if (ret < 0) { in match_rom()
253 return ret; in match_rom()
257 ret = w1_write_byte(dev, cmd); in match_rom()
258 if (ret < 0) { in match_rom()
259 return ret; in match_rom()
261 ret = w1_write_block(dev, (uint8_t *)&config->rom, 8); in match_rom()
262 if (ret < 0) { in match_rom()
263 return ret; in match_rom()
277 int ret; in w1_match_rom() local
280 ret = match_rom(dev, config); in w1_match_rom()
282 return ret; in w1_match_rom()
287 int ret; in w1_resume_command() local
290 ret = w1_reset_bus(dev); in w1_resume_command()
291 if (ret == 0) { in w1_resume_command()
292 ret = -ENODEV; in w1_resume_command()
295 if (ret < 0) { in w1_resume_command()
299 ret = w1_write_byte(dev, W1_CMD_RESUME); in w1_resume_command()
302 return ret; in w1_resume_command()
307 int ret; in skip_rom() local
316 ret = w1_reset_bus(dev); in skip_rom()
317 if (ret == 0) { in skip_rom()
320 if (ret < 0) { in skip_rom()
321 return ret; in skip_rom()
325 ret = w1_write_byte(dev, cmd); in skip_rom()
326 if (ret < 0) { in skip_rom()
327 return ret; in skip_rom()
341 int ret; in w1_skip_rom() local
344 ret = skip_rom(dev, config); in w1_skip_rom()
346 return ret; in w1_skip_rom()
360 int ret; in w1_reset_select() local
363 ret = reset_select(dev, config); in w1_reset_select()
365 return ret; in w1_reset_select()
372 int ret; in write_read() local
374 ret = reset_select(dev, config); in write_read()
375 if (ret != 0) { in write_read()
376 return ret; in write_read()
379 ret = w1_write_block(dev, write_buf, write_len); in write_read()
380 if (ret < 0) { in write_read()
381 return ret; in write_read()
394 int ret; in w1_write_read() local
397 ret = write_read(dev, config, write_buf, write_len, read_buf, read_len); in w1_write_read()
399 return ret; in w1_write_read()