aboutsummaryrefslogtreecommitdiff
path: root/include/reset.h
diff options
context:
space:
mode:
authorJagan Teki2019-02-28 00:26:55 +0530
committerJagan Teki2019-05-09 00:44:13 +0530
commitea9dc35aab9fd9e87cbb73a3a63fcbea4d6378c3 (patch)
tree1784b86aaf3ce4e1cedd64b5330d036e9d97d104 /include/reset.h
parentd7a672e35f4788f95cee36797f7cf80474fd151b (diff)
reset: Get the RESET by index without device
Getting a RESET by index with device is not straight forward for some use-cases like handling clock operations for child node in parent driver. So we need to process the child node in parent probe via ofnode and process RESET operation for child without udevice but with ofnode. So add reset_get_by_index_nodev() and move the common code in reset_get_by_index_tail() to use for reset_get_by_index() Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/reset.h')
-rw-r--r--include/reset.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/reset.h b/include/reset.h
index 65aa7a4ce5e..57bbc0b49de 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -6,6 +6,7 @@
#ifndef _RESET_H
#define _RESET_H
+#include <dm/ofnode.h>
#include <linux/errno.h>
/**
@@ -100,6 +101,21 @@ int reset_get_by_index(struct udevice *dev, int index,
struct reset_ctl *reset_ctl);
/**
+ * reset_get_by_index_nodev - Get/request a reset signal by integer index
+ * without a device.
+ *
+ * This is a version of reset_get_by_index() that does not use a device.
+ *
+ * @node: The client ofnode.
+ * @index: The index of the reset signal to request, within the client's
+ * list of reset signals.
+ * @reset_ctl A pointer to a reset control struct to initialize.
+ * @return 0 if OK, or a negative error code.
+ */
+int reset_get_by_index_nodev(ofnode node, int index,
+ struct reset_ctl *reset_ctl);
+
+/**
* reset_get_bulk - Get/request all reset signals of a device.
*
* This looks up and requests all reset signals of the client device; each