summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libmtd.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libmtd.h b/include/libmtd.h
index cc24af8..6ab0de5 100644
--- a/include/libmtd.h
+++ b/include/libmtd.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008, 2009 Nokia Corporation
+ * Copyright 2021 NXP
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -175,6 +176,20 @@ int mtd_lock(const struct mtd_dev_info *mtd, int fd, int eb);
int mtd_unlock(const struct mtd_dev_info *mtd, int fd, int eb);
/**
+ * mtd_unlock_multi - unlock eraseblocks.
+ * @desc: MTD library descriptor
+ * @mtd: MTD device description object
+ * @fd: MTD device node file descriptor
+ * @eb: index of first eraseblock to unlock
+ * @blocks: the number of eraseblocks to unlock
+ *
+ * This function unlocks @blocks starting at eraseblock @eb.
+ * Returns %0 in case of success and %-1 in case of failure.
+ */
+int mtd_unlock_multi(const struct mtd_dev_info *mtd, int fd, int eb,
+ int blocks);
+
+/**
* mtd_erase - erase multiple eraseblocks.
* @desc: MTD library descriptor
* @mtd: MTD device description object