Lines Matching refs:retlen

506 	size_t retlen;  in mtd_nvmem_reg_read()  local
509 err = mtd_read(mtd, offset, bytes, &retlen, val); in mtd_nvmem_reg_read()
513 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_reg_read()
846 size_t retlen; in mtd_otp_size() local
854 ret = mtd_get_user_prot_info(mtd, PAGE_SIZE, &retlen, info); in mtd_otp_size()
856 ret = mtd_get_fact_prot_info(mtd, PAGE_SIZE, &retlen, info); in mtd_otp_size()
860 for (i = 0; i < retlen / sizeof(*info); i++) in mtd_otp_size()
913 size_t retlen; in mtd_nvmem_user_otp_reg_read() local
916 ret = mtd_read_user_prot_reg(mtd, offset, bytes, &retlen, val); in mtd_nvmem_user_otp_reg_read()
920 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_user_otp_reg_read()
927 size_t retlen; in mtd_nvmem_fact_otp_reg_read() local
930 ret = mtd_read_fact_prot_reg(mtd, offset, bytes, &retlen, val); in mtd_nvmem_fact_otp_reg_read()
934 return retlen == bytes ? 0 : -EIO; in mtd_nvmem_fact_otp_reg_read()
1374 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_point() argument
1379 *retlen = 0; in mtd_point()
1391 return master->_point(master, from, len, retlen, virt, phys); in mtd_point()
1418 size_t retlen; in mtd_get_unmapped_area() local
1422 ret = mtd_point(mtd, offset, len, &retlen, &virt, NULL); in mtd_get_unmapped_area()
1425 if (retlen != len) { in mtd_get_unmapped_area()
1426 mtd_unpoint(mtd, offset, retlen); in mtd_get_unmapped_area()
1452 int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_read() argument
1462 *retlen = ops.retlen; in mtd_read()
1468 int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_write() argument
1478 *retlen = ops.retlen; in mtd_write()
1491 int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_panic_write() argument
1496 *retlen = 0; in mtd_panic_write()
1509 retlen, buf); in mtd_panic_write()
1556 ret = master->_read(master, from, ops->len, &ops->retlen, in mtd_read_oob_std()
1572 ret = master->_write(master, to, ops->len, &ops->retlen, in mtd_write_oob_std()
1598 while (ops->retlen < ops->len || ops->oobretlen < ops->ooblen) { in mtd_io_emulated_slc()
1609 adjops.len = ops->len - ops->retlen; in mtd_io_emulated_slc()
1629 ops->retlen += adjops.retlen; in mtd_io_emulated_slc()
1631 adjops.datbuf += adjops.retlen; in mtd_io_emulated_slc()
1647 ops->retlen = ops->oobretlen = 0; in mtd_read_oob()
1691 ops->retlen = ops->oobretlen = 0; in mtd_write_oob()
2082 int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen, in mtd_get_fact_prot_info() argument
2091 return master->_get_fact_prot_info(master, len, retlen, buf); in mtd_get_fact_prot_info()
2096 size_t *retlen, u_char *buf) in mtd_read_fact_prot_reg() argument
2100 *retlen = 0; in mtd_read_fact_prot_reg()
2105 return master->_read_fact_prot_reg(master, from, len, retlen, buf); in mtd_read_fact_prot_reg()
2109 int mtd_get_user_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen, in mtd_get_user_prot_info() argument
2118 return master->_get_user_prot_info(master, len, retlen, buf); in mtd_get_user_prot_info()
2123 size_t *retlen, u_char *buf) in mtd_read_user_prot_reg() argument
2127 *retlen = 0; in mtd_read_user_prot_reg()
2132 return master->_read_user_prot_reg(master, from, len, retlen, buf); in mtd_read_user_prot_reg()
2137 size_t *retlen, const u_char *buf) in mtd_write_user_prot_reg() argument
2142 *retlen = 0; in mtd_write_user_prot_reg()
2147 ret = master->_write_user_prot_reg(master, to, len, retlen, buf); in mtd_write_user_prot_reg()
2155 return (*retlen) ? 0 : -ENOSPC; in mtd_write_user_prot_reg()
2316 unsigned long count, loff_t to, size_t *retlen) in default_mtd_writev() argument
2332 *retlen = totlen; in default_mtd_writev()
2348 unsigned long count, loff_t to, size_t *retlen) in mtd_writev() argument
2352 *retlen = 0; in mtd_writev()
2357 return default_mtd_writev(mtd, vecs, count, to, retlen); in mtd_writev()
2360 mtd_get_master_ofs(mtd, to), retlen); in mtd_writev()