Lines Matching refs:dev_master
293 static int trigger_bulk_read(struct w1_master *dev_master);
1095 static int w1_poll_completion(struct w1_master *dev_master, int tout_ms) in w1_poll_completion() argument
1104 if (w1_read_8(dev_master) == 0xFF) in w1_poll_completion()
1115 struct w1_master *dev_master = sl->master; in convert_t() local
1143 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in convert_t()
1158 w1_next_pullup(dev_master, t_conv); in convert_t()
1160 w1_write_8(dev_master, W1_CONVERT_TEMP); in convert_t()
1163 ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); in convert_t()
1168 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1175 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1177 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1205 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1216 struct w1_master *dev_master = sl->master; in conv_time_measure() local
1238 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in conv_time_measure()
1251 w1_write_8(dev_master, W1_CONVERT_TEMP); in conv_time_measure()
1254 ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); in conv_time_measure()
1268 mutex_unlock(&dev_master->bus_mutex); in conv_time_measure()
1275 mutex_unlock(&dev_master->bus_mutex); in conv_time_measure()
1284 struct w1_master *dev_master = sl->master; in read_scratchpad() local
1298 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in read_scratchpad()
1308 w1_write_8(dev_master, W1_READ_SCRATCHPAD); in read_scratchpad()
1310 nb_bytes_read = w1_read_block(dev_master, info->rom, 9); in read_scratchpad()
1328 mutex_unlock(&dev_master->bus_mutex); in read_scratchpad()
1338 struct w1_master *dev_master = sl->master; in write_scratchpad() local
1348 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in write_scratchpad()
1356 w1_write_8(dev_master, W1_WRITE_SCRATCHPAD); in write_scratchpad()
1357 w1_write_block(dev_master, data, nb_bytes); in write_scratchpad()
1361 mutex_unlock(&dev_master->bus_mutex); in write_scratchpad()
1371 struct w1_master *dev_master = sl->master; in copy_scratchpad() local
1387 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in copy_scratchpad()
1399 w1_next_pullup(dev_master, t_write); in copy_scratchpad()
1401 w1_write_8(dev_master, W1_COPY_SCRATCHPAD); in copy_scratchpad()
1416 mutex_unlock(&dev_master->bus_mutex); in copy_scratchpad()
1425 struct w1_master *dev_master = sl->master; in recall_eeprom() local
1435 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in recall_eeprom()
1444 w1_write_8(dev_master, W1_RECALL_EEPROM); in recall_eeprom()
1445 ret = w1_poll_completion(dev_master, W1_POLL_RECALL_EEPROM); in recall_eeprom()
1450 mutex_unlock(&dev_master->bus_mutex); in recall_eeprom()
1460 struct w1_master *dev_master = sl->master; in read_powermode() local
1470 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in read_powermode()
1478 w1_write_8(dev_master, W1_READ_PSUPPLY); in read_powermode()
1484 ret = w1_touch_bit(dev_master, 1); in read_powermode()
1488 mutex_unlock(&dev_master->bus_mutex); in read_powermode()
1496 static int trigger_bulk_read(struct w1_master *dev_master) in trigger_bulk_read() argument
1509 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1530 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in trigger_bulk_read()
1537 if (!w1_reset_bus(dev_master)) { /* Just reset the bus */ in trigger_bulk_read()
1540 w1_write_8(dev_master, W1_SKIP_ROM); in trigger_bulk_read()
1543 w1_next_pullup(dev_master, t_conv); in trigger_bulk_read()
1545 w1_write_8(dev_master, W1_CONVERT_TEMP); in trigger_bulk_read()
1549 &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1560 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1562 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1575 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1578 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1945 struct w1_master *dev_master = dev_to_w1_master(device); in therm_bulk_read_store() local
1951 ret = trigger_bulk_read(dev_master); in therm_bulk_read_store()
1964 struct w1_master *dev_master = dev_to_w1_master(device); in therm_bulk_read_show() local
1968 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in therm_bulk_read_show()