summaryrefslogtreecommitdiff
path: root/include/reset.h
diff options
context:
space:
mode:
authorAndreas Dannenberg <dannenberg@ti.com>2018-08-27 15:57:39 +0530
committerTom Rini <trini@konsulko.com>2018-09-11 08:32:55 -0400
commite7012e6e1f9e1c16f093d71bd53b34a6467f07bc (patch)
tree3ae6f0557351476502ee371cbc4a82c81465e1db /include/reset.h
parentaec99c9776d33a1c2218f975a02cb1068cdcf579 (diff)
downloadu-boot-e7012e6e1f9e1c16f093d71bd53b34a6467f07bc.tar.gz
u-boot-e7012e6e1f9e1c16f093d71bd53b34a6467f07bc.tar.bz2
u-boot-e7012e6e1f9e1c16f093d71bd53b34a6467f07bc.zip
dm: reset: Update uclass to allow querying reset status
Add a reset operations function pointer to support querying the current status of a reset control. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'include/reset.h')
-rw-r--r--include/reset.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/reset.h b/include/reset.h
index a7bbc1c331..34ebb096dd 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -207,6 +207,15 @@ int reset_deassert(struct reset_ctl *reset_ctl);
int reset_deassert_bulk(struct reset_ctl_bulk *bulk);
/**
+ * rst_status - Check reset signal status.
+ *
+ * @reset_ctl: The reset signal to check.
+ * @return 0 if deasserted, positive if asserted, or a negative
+ * error code.
+ */
+int reset_status(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
@@ -279,6 +288,11 @@ static inline int reset_deassert_bulk(struct reset_ctl_bulk *bulk)
return 0;
}
+static inline int reset_status(struct reset_ctl *reset_ctl)
+{
+ return -ENOTSUPP;
+}
+
static inline int reset_release_all(struct reset_ctl *reset_ctl, int count)
{
return 0;