• Home
  • Raw
  • Download

Lines Matching refs:sl

61 static int w1_f0d_readblock(struct w1_slave *sl, int off, int count, char *buf)  in w1_f0d_readblock()  argument
72 if (w1_reset_select_slave(sl)) in w1_f0d_readblock()
75 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f0d_readblock()
76 w1_read_block(sl->master, buf, count); in w1_f0d_readblock()
78 if (w1_reset_select_slave(sl)) in w1_f0d_readblock()
81 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f0d_readblock()
82 w1_read_block(sl->master, cmp, count); in w1_f0d_readblock()
88 dev_err(&sl->dev, "proof reading failed %d times\n", in w1_f0d_readblock()
98 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f0d_read_bin() local
105 mutex_lock(&sl->master->mutex); in w1_f0d_read_bin()
116 if (w1_f0d_readblock(sl, off, block_read, buf) < 0) { in w1_f0d_read_bin()
126 mutex_unlock(&sl->master->mutex); in w1_f0d_read_bin()
144 static int w1_f0d_write(struct w1_slave *sl, int addr, int len, const u8 *data) in w1_f0d_write() argument
152 dev_err(&sl->dev, "%s: bad addr/len - addr=%#x len=%d\n", in w1_f0d_write()
160 if (w1_reset_select_slave(sl)) in w1_f0d_write()
167 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f0d_write()
168 w1_write_block(sl->master, data, len); in w1_f0d_write()
170 w1_read_block(sl->master, rdbuf, sizeof(rdbuf)); in w1_f0d_write()
177 dev_err(&sl->dev, in w1_f0d_write()
187 w1_write_8(sl->master, W1_F0D_RELEASE); in w1_f0d_write()
193 cs = w1_read_8(sl->master); in w1_f0d_write()
195 dev_err(&sl->dev, "save to eeprom failed = CS=%#x\n", cs); in w1_f0d_write()
206 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f0d_write_bin() local
214 mutex_lock(&sl->master->mutex); in w1_f0d_write_bin()
226 if (w1_f0d_readblock(sl, addr & ~W1_F0D_SCRATCH_MASK, in w1_f0d_write_bin()
240 if (w1_f0d_write(sl, addr & ~W1_F0D_SCRATCH_MASK, in w1_f0d_write_bin()
248 if (w1_f0d_write(sl, addr, copy, buf) < 0) { in w1_f0d_write_bin()
259 mutex_unlock(&sl->master->mutex); in w1_f0d_write_bin()
274 static int w1_f0d_add_slave(struct w1_slave *sl) in w1_f0d_add_slave() argument
276 return sysfs_create_bin_file(&sl->dev.kobj, &w1_f0d_bin_attr); in w1_f0d_add_slave()
279 static void w1_f0d_remove_slave(struct w1_slave *sl) in w1_f0d_remove_slave() argument
281 sysfs_remove_bin_file(&sl->dev.kobj, &w1_f0d_bin_attr); in w1_f0d_remove_slave()