sandbox: DTS: w1: add node for one wire interface on GPIO
[oweals/u-boot.git] / include / sysreset.h
index 393c7be3d8111692d35a2d8de108731b6a3c83ab..a5c0b74a4736e387e14516bf8a424d5f621fa7d7 100644 (file)
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (c) 2015 Google, Inc
  * Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __SYSRESET_H
@@ -29,6 +28,14 @@ struct sysreset_ops {
         *              (in which case this method will not actually return)
         */
        int (*request)(struct udevice *dev, enum sysreset_t type);
+       /**
+        * get_status() - get printable reset status information
+        *
+        * @buf:        Buffer to receive the textual reset information
+        * @size:       Size of the passed buffer
+        * @return 0 if OK, -ve on error
+        */
+       int (*get_status)(struct udevice *dev, char *buf, int size);
 };
 
 #define sysreset_get_ops(dev)        ((struct sysreset_ops *)(dev)->driver->ops)
@@ -41,6 +48,15 @@ struct sysreset_ops {
  */
 int sysreset_request(struct udevice *dev, enum sysreset_t type);
 
+/**
+ * get_status() - get printable reset status information
+ *
+ * @buf:       Buffer to receive the textual reset information
+ * @size:      Size of the passed buffer
+ * @return 0 if OK, -ve on error
+ */
+int sysreset_get_status(struct udevice *dev, char *buf, int size);
+
 /**
  * sysreset_walk() - cause a system reset
  *