summaryrefslogtreecommitdiff
path: root/include/sysreset.h
diff options
context:
space:
mode:
authorVaradarajan Narayanan <[email protected]>2026-01-21 12:09:17 +0530
committerCasey Connolly <[email protected]>2026-04-27 12:38:44 +0200
commitfcb48b89813b14f38b31b86b4a6ace376bd86d8b (patch)
tree32b58a11ac8974697a3c6c71f53654e84fb2f8e3 /include/sysreset.h
parentf9e3f5f75c577895fac748f47acf684337ba2cee (diff)
drivers: sysreset: Add sysreset op that can take arguments
Add a 'request_arg' op to struct sysreset_ops to enable sysreset drivers to receive arguments given to the 'reset' command. Process the request_arg() op before the usual request() op. Reviewed-by: Casey Connolly <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Varadarajan Narayanan <[email protected]> Reviewed-by: Tom Rini <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
Diffstat (limited to 'include/sysreset.h')
-rw-r--r--include/sysreset.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sysreset.h b/include/sysreset.h
index ff20abdeed3..d1cc9ebc542 100644
--- a/include/sysreset.h
+++ b/include/sysreset.h
@@ -43,6 +43,24 @@ struct sysreset_ops {
* (in which case this method will not actually return)
*/
int (*request)(struct udevice *dev, enum sysreset_t type);
+
+ /**
+ * @request_arg: Reset handler implementations that might need to process
+ * arguments given to the 'reset' command.
+ *
+ * Note that this function may return before the reset takes effect.
+ *
+ * @dev: Device to be used for system reset
+ * @argc: No. of items in @argv
+ * @argv: Arguments given to 'reset' command
+ * Return:
+ * -EINPROGRESS if the reset has started and will complete soon
+ * -EPROTONOSUPPORT if not supported by this device
+ * 0 if the reset has already happened
+ * (in which case this method will not actually return)
+ */
+ int (*request_arg)(struct udevice *dev, int argc, char * const argv[]);
+
/**
* @get_status: get printable reset status information
*