diff mbox series

[U-Boot,v6,17/20] reset: Add reset valid

Message ID 20190110184016.17027-18-jagan@amarulasolutions.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series clk: Add Allwinner CLK, RESET support | expand

Commit Message

Jagan Teki Jan. 10, 2019, 6:40 p.m. UTC
Add reset_valid to check whether given reset is valid
or not.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 include/reset.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/include/reset.h b/include/reset.h
index bc495a90c2..65aa7a4ce5 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -306,4 +306,15 @@  static inline int reset_release_bulk(struct reset_ctl_bulk *bulk)
 }
 #endif
 
+/**
+ * reset_valid() - check if reset is valid
+ *
+ * @reset_ctl:		the reset to check
+ * @return TRUE if valid, or FALSE
+ */
+static inline bool reset_valid(struct reset_ctl *reset_ctl)
+{
+	return !!reset_ctl->dev;
+}
+
 #endif