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()
1168 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1171 ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); in convert_t()
1176 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1179 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1208 mutex_unlock(&dev_master->bus_mutex); in convert_t()
1219 struct w1_master *dev_master = sl->master; in conv_time_measure() local
1241 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in conv_time_measure()
1254 w1_write_8(dev_master, W1_CONVERT_TEMP); in conv_time_measure()
1257 ret = w1_poll_completion(dev_master, W1_POLL_CONVERT_TEMP); in conv_time_measure()
1271 mutex_unlock(&dev_master->bus_mutex); in conv_time_measure()
1278 mutex_unlock(&dev_master->bus_mutex); in conv_time_measure()
1287 struct w1_master *dev_master = sl->master; in read_scratchpad() local
1301 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in read_scratchpad()
1311 w1_write_8(dev_master, W1_READ_SCRATCHPAD); in read_scratchpad()
1313 nb_bytes_read = w1_read_block(dev_master, info->rom, 9); in read_scratchpad()
1331 mutex_unlock(&dev_master->bus_mutex); in read_scratchpad()
1341 struct w1_master *dev_master = sl->master; in write_scratchpad() local
1351 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in write_scratchpad()
1359 w1_write_8(dev_master, W1_WRITE_SCRATCHPAD); in write_scratchpad()
1360 w1_write_block(dev_master, data, nb_bytes); in write_scratchpad()
1364 mutex_unlock(&dev_master->bus_mutex); in write_scratchpad()
1374 struct w1_master *dev_master = sl->master; in copy_scratchpad() local
1390 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in copy_scratchpad()
1402 w1_next_pullup(dev_master, t_write); in copy_scratchpad()
1404 w1_write_8(dev_master, W1_COPY_SCRATCHPAD); in copy_scratchpad()
1419 mutex_unlock(&dev_master->bus_mutex); in copy_scratchpad()
1428 struct w1_master *dev_master = sl->master; in recall_eeprom() local
1438 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in recall_eeprom()
1447 w1_write_8(dev_master, W1_RECALL_EEPROM); in recall_eeprom()
1448 ret = w1_poll_completion(dev_master, W1_POLL_RECALL_EEPROM); in recall_eeprom()
1453 mutex_unlock(&dev_master->bus_mutex); in recall_eeprom()
1463 struct w1_master *dev_master = sl->master; in read_powermode() local
1473 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in read_powermode()
1481 w1_write_8(dev_master, W1_READ_PSUPPLY); in read_powermode()
1487 ret = w1_touch_bit(dev_master, 1); in read_powermode()
1491 mutex_unlock(&dev_master->bus_mutex); in read_powermode()
1499 static int trigger_bulk_read(struct w1_master *dev_master) in trigger_bulk_read() argument
1512 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1533 if (!bus_mutex_lock(&dev_master->bus_mutex)) { in trigger_bulk_read()
1540 if (!w1_reset_bus(dev_master)) { /* Just reset the bus */ in trigger_bulk_read()
1543 w1_write_8(dev_master, W1_SKIP_ROM); in trigger_bulk_read()
1546 w1_next_pullup(dev_master, t_conv); in trigger_bulk_read()
1548 w1_write_8(dev_master, W1_CONVERT_TEMP); in trigger_bulk_read()
1552 &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1563 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1565 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1578 mutex_unlock(&dev_master->bus_mutex); in trigger_bulk_read()
1581 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in trigger_bulk_read()
1948 struct w1_master *dev_master = dev_to_w1_master(device); in therm_bulk_read_store() local
1954 ret = trigger_bulk_read(dev_master); in therm_bulk_read_store()
1967 struct w1_master *dev_master = dev_to_w1_master(device); in therm_bulk_read_show() local
1971 list_for_each_entry(sl, &dev_master->slist, w1_slave_entry) { in therm_bulk_read_show()