/* Returns 0 on success, a negative error code otherwise.  */
int nand_change_write_column_op(struct nand_chip *chip, unsigned int offset_in_page, const void *buf, unsigned int len, bool force_8bit)
/* Returns 0 on success, a negative error code otherwise.  */
int nand_change_write_column_op(struct nand_chip *chip, unsigned int offset_in_page, const void *buf, unsigned int len, bool force_8bit)
{
	struct mtd_info *mtd = nand_to_mtd(chip);
	if (len && !buf)
		return -EINVAL;
	if (offset_in_page + len > mtd->writesize + mtd->oobsize)
		return -EINVAL;
	chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset_in_page, -1);
	if (len)
		chip->write_buf(mtd, buf, len);
	return 0;
}