Lines Matching refs:sl
31 struct w1_slave *sl = kobj_to_w1_slave(kobj); in state_read() local
36 dev_dbg(&sl->dev, in state_read()
45 mutex_lock(&sl->master->bus_mutex); in state_read()
46 dev_dbg(&sl->dev, "mutex locked"); in state_read()
49 if (w1_reset_select_slave(sl)) in state_read()
53 w1_write_8(sl->master, W1_F3A_FUNC_PIO_ACCESS_READ); in state_read()
55 state = w1_read_8(sl->master); in state_read()
63 dev_warn(&sl->dev, "slave device did not respond to PIO_ACCESS_READ, " \ in state_read()
68 if (w1_reset_resume_command(sl->master)) in state_read()
71 dev_warn(&sl->dev, "PIO_ACCESS_READ error, retries left: %d\n", retries); in state_read()
75 mutex_unlock(&sl->master->bus_mutex); in state_read()
76 dev_dbg(&sl->dev, "%s, mutex unlocked, retries: %d\n", in state_read()
87 struct w1_slave *sl = kobj_to_w1_slave(kobj); in output_write() local
95 dev_dbg(&sl->dev, "locking mutex for write_output"); in output_write()
96 mutex_lock(&sl->master->bus_mutex); in output_write()
97 dev_dbg(&sl->dev, "mutex locked"); in output_write()
99 if (w1_reset_select_slave(sl)) in output_write()
110 w1_write_block(sl->master, w1_buf, 3); in output_write()
112 if (w1_read_8(sl->master) == W1_F3A_SUCCESS_CONFIRM_BYTE) { in output_write()
116 if (w1_reset_resume_command(sl->master)) in output_write()
119 dev_warn(&sl->dev, "PIO_ACCESS_WRITE error, retries left: %d\n", retries); in output_write()
123 mutex_unlock(&sl->master->bus_mutex); in output_write()
124 dev_dbg(&sl->dev, "%s, mutex unlocked, retries: %d\n", in output_write()