Lines Matching refs:retlen
524 size_t retlen; in mtd_nvmem_reg_read() local
527 err = mtd_read(mtd, offset, bytes, &retlen, val); in mtd_nvmem_reg_read()
531 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_reg_read()
787 size_t retlen; in mtd_otp_size() local
795 ret = mtd_get_user_prot_info(mtd, PAGE_SIZE, &retlen, info); in mtd_otp_size()
797 ret = mtd_get_fact_prot_info(mtd, PAGE_SIZE, &retlen, info); in mtd_otp_size()
801 for (i = 0; i < retlen / sizeof(*info); i++) in mtd_otp_size()
853 size_t retlen; in mtd_nvmem_user_otp_reg_read() local
856 ret = mtd_read_user_prot_reg(mtd, offset, bytes, &retlen, val); in mtd_nvmem_user_otp_reg_read()
860 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_user_otp_reg_read()
867 size_t retlen; in mtd_nvmem_fact_otp_reg_read() local
870 ret = mtd_read_fact_prot_reg(mtd, offset, bytes, &retlen, val); in mtd_nvmem_fact_otp_reg_read()
874 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_fact_otp_reg_read()
1288 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_point() argument
1293 *retlen = 0; in mtd_point()
1305 return master->_point(master, from, len, retlen, virt, phys); in mtd_point()
1332 size_t retlen; in mtd_get_unmapped_area() local
1336 ret = mtd_point(mtd, offset, len, &retlen, &virt, NULL); in mtd_get_unmapped_area()
1339 if (retlen != len) { in mtd_get_unmapped_area()
1340 mtd_unpoint(mtd, offset, retlen); in mtd_get_unmapped_area()
1366 int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_read() argument
1376 *retlen = ops.retlen; in mtd_read()
1382 int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_write() argument
1392 *retlen = ops.retlen; in mtd_write()
1405 int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_panic_write() argument
1410 *retlen = 0; in mtd_panic_write()
1423 retlen, buf); in mtd_panic_write()
1470 ret = master->_read(master, from, ops->len, &ops->retlen, in mtd_read_oob_std()
1486 ret = master->_write(master, to, ops->len, &ops->retlen, in mtd_write_oob_std()
1512 while (ops->retlen < ops->len || ops->oobretlen < ops->ooblen) { in mtd_io_emulated_slc()
1523 adjops.len = ops->len - ops->retlen; in mtd_io_emulated_slc()
1543 ops->retlen += adjops.retlen; in mtd_io_emulated_slc()
1545 adjops.datbuf += adjops.retlen; in mtd_io_emulated_slc()
1561 ops->retlen = ops->oobretlen = 0; in mtd_read_oob()
1600 ops->retlen = ops->oobretlen = 0; in mtd_write_oob()
1991 int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen, in mtd_get_fact_prot_info() argument
2000 return master->_get_fact_prot_info(master, len, retlen, buf); in mtd_get_fact_prot_info()
2005 size_t *retlen, u_char *buf) in mtd_read_fact_prot_reg() argument
2009 *retlen = 0; in mtd_read_fact_prot_reg()
2014 return master->_read_fact_prot_reg(master, from, len, retlen, buf); in mtd_read_fact_prot_reg()
2018 int mtd_get_user_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen, in mtd_get_user_prot_info() argument
2027 return master->_get_user_prot_info(master, len, retlen, buf); in mtd_get_user_prot_info()
2032 size_t *retlen, u_char *buf) in mtd_read_user_prot_reg() argument
2036 *retlen = 0; in mtd_read_user_prot_reg()
2041 return master->_read_user_prot_reg(master, from, len, retlen, buf); in mtd_read_user_prot_reg()
2046 size_t *retlen, const u_char *buf) in mtd_write_user_prot_reg() argument
2051 *retlen = 0; in mtd_write_user_prot_reg()
2056 ret = master->_write_user_prot_reg(master, to, len, retlen, buf); in mtd_write_user_prot_reg()
2064 return (*retlen) ? 0 : -ENOSPC; in mtd_write_user_prot_reg()
2225 unsigned long count, loff_t to, size_t *retlen) in default_mtd_writev() argument
2241 *retlen = totlen; in default_mtd_writev()
2257 unsigned long count, loff_t to, size_t *retlen) in mtd_writev() argument
2261 *retlen = 0; in mtd_writev()
2266 return default_mtd_writev(mtd, vecs, count, to, retlen); in mtd_writev()
2269 mtd_get_master_ofs(mtd, to), retlen); in mtd_writev()