Lines Matching refs:sl

24 	struct w1_slave *sl = container_of(dev, struct w1_slave, dev);  in w1_reg_a8_v8_read()  local
30 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_read()
31 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v8_read()
32 w1_write_8(sl->master, W1_CMD_READ_DATA); in w1_reg_a8_v8_read()
33 w1_write_8(sl->master, reg); in w1_reg_a8_v8_read()
34 *val = w1_read_8(sl->master); in w1_reg_a8_v8_read()
38 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v8_read()
46 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a8_v8_write() local
52 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_write()
53 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v8_write()
54 w1_write_8(sl->master, W1_CMD_WRITE_DATA); in w1_reg_a8_v8_write()
55 w1_write_8(sl->master, reg); in w1_reg_a8_v8_write()
56 w1_write_8(sl->master, val); in w1_reg_a8_v8_write()
60 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v8_write()
73 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a8_v16_read() local
79 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v16_read()
80 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v16_read()
81 w1_write_8(sl->master, W1_CMD_READ_DATA); in w1_reg_a8_v16_read()
82 w1_write_8(sl->master, reg); in w1_reg_a8_v16_read()
83 *val = w1_read_8(sl->master); in w1_reg_a8_v16_read()
84 *val |= w1_read_8(sl->master)<<8; in w1_reg_a8_v16_read()
88 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v16_read()
97 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a8_v16_write() local
103 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v16_write()
104 if (!w1_reset_select_slave(sl)) { in w1_reg_a8_v16_write()
105 w1_write_8(sl->master, W1_CMD_WRITE_DATA); in w1_reg_a8_v16_write()
106 w1_write_8(sl->master, reg); in w1_reg_a8_v16_write()
107 w1_write_8(sl->master, val & 0x00FF); in w1_reg_a8_v16_write()
108 w1_write_8(sl->master, val>>8 & 0x00FF); in w1_reg_a8_v16_write()
112 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v16_write()
125 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a16_v16_read() local
131 mutex_lock(&sl->master->bus_mutex); in w1_reg_a16_v16_read()
132 if (!w1_reset_select_slave(sl)) { in w1_reg_a16_v16_read()
133 w1_write_8(sl->master, W1_CMD_READ_DATA); in w1_reg_a16_v16_read()
134 w1_write_8(sl->master, reg & 0x00FF); in w1_reg_a16_v16_read()
135 w1_write_8(sl->master, reg>>8 & 0x00FF); in w1_reg_a16_v16_read()
136 *val = w1_read_8(sl->master); in w1_reg_a16_v16_read()
137 *val |= w1_read_8(sl->master)<<8; in w1_reg_a16_v16_read()
141 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a16_v16_read()
150 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_reg_a16_v16_write() local
156 mutex_lock(&sl->master->bus_mutex); in w1_reg_a16_v16_write()
157 if (!w1_reset_select_slave(sl)) { in w1_reg_a16_v16_write()
158 w1_write_8(sl->master, W1_CMD_WRITE_DATA); in w1_reg_a16_v16_write()
159 w1_write_8(sl->master, reg & 0x00FF); in w1_reg_a16_v16_write()
160 w1_write_8(sl->master, reg>>8 & 0x00FF); in w1_reg_a16_v16_write()
161 w1_write_8(sl->master, val & 0x00FF); in w1_reg_a16_v16_write()
162 w1_write_8(sl->master, val>>8 & 0x00FF); in w1_reg_a16_v16_write()
166 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a16_v16_write()