return ops->request(dev, type);
}
+int sysreset_get_status(struct udevice *dev, char *buf, int size)
+{
+ struct sysreset_ops *ops = sysreset_get_ops(dev);
+
+ if (!ops->get_status)
+ return -ENOSYS;
+
+ return ops->get_status(dev, buf, size);
+}
+
int sysreset_walk(enum sysreset_t type)
{
struct udevice *dev;
* (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)
*/
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
*