Lines Matching refs:bin
35 struct bin_attribute bin; member
80 if (unlikely(offset >= at25->bin.size)) in at25_ee_read()
82 if ((offset + count) > at25->bin.size) in at25_ee_read()
83 count = at25->bin.size - offset; in at25_ee_read()
158 if (unlikely(off >= at25->bin.size)) in at25_ee_write()
160 if ((off + count) > at25->bin.size) in at25_ee_write()
161 count = at25->bin.size - off; in at25_ee_write()
414 sysfs_bin_attr_init(&at25->bin); in at25_probe()
415 at25->bin.attr.name = "eeprom"; in at25_probe()
416 at25->bin.attr.mode = S_IRUSR; in at25_probe()
417 at25->bin.read = at25_bin_read; in at25_probe()
420 at25->bin.size = at25->chip.byte_len; in at25_probe()
422 at25->bin.write = at25_bin_write; in at25_probe()
423 at25->bin.attr.mode |= S_IWUSR; in at25_probe()
427 err = sysfs_create_bin_file(&spi->dev.kobj, &at25->bin); in at25_probe()
435 (at25->bin.size < 1024) in at25_probe()
436 ? at25->bin.size in at25_probe()
437 : (at25->bin.size / 1024), in at25_probe()
438 (at25->bin.size < 1024) ? "Byte" : "KByte", in at25_probe()
450 sysfs_remove_bin_file(&spi->dev.kobj, &at25->bin); in at25_remove()