summaryrefslogtreecommitdiff
path: root/include/reset.h
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2017-07-18 11:57:06 +0200
committerMarek Vasut <marex@denx.de>2017-07-28 23:34:07 +0200
commit3b9d1bdd4e5fe0c44e5d4d0a0916dbccc558749d (patch)
tree893fe1b1333220392483fe4cdc29f93dffe06a02 /include/reset.h
parent9bd5cdf6b62b249dc48a00a23b44dc7be547f9f9 (diff)
reset: add reset_release_all()
Add reset_release_all() method which Assert/Free an array of resets signal that has been previously successfully requested by reset_get_by_*() Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/reset.h')
-rw-r--r--include/reset.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/reset.h b/include/reset.h
index 4f2e35f38f..7185ade7ac 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -144,6 +144,18 @@ int reset_assert(struct reset_ctl *reset_ctl);
*/
int reset_deassert(struct reset_ctl *reset_ctl);
+/**
+ * reset_release_all - Assert/Free an array of previously requested resets.
+ *
+ * For each reset contained in the reset array, this function will check if
+ * reset has been previously requested and then will assert and free it.
+ *
+ * @reset_ctl: A reset struct array that was previously successfully
+ * requested by reset_get_by_*().
+ * @count Number of reset contained in the array
+ * @return 0 if OK, or a negative error code.
+ */
+int reset_release_all(struct reset_ctl *reset_ctl, int count);
#else
static inline int reset_get_by_index(struct udevice *dev, int index,
struct reset_ctl *reset_ctl)
@@ -171,6 +183,12 @@ static inline int reset_deassert(struct reset_ctl *reset_ctl)
{
return 0;
}
+
+static inline int reset_release_all(struct reset_ctl *reset_ctl, int count)
+{
+ return 0;
+}
+
#endif
#endif