summaryrefslogtreecommitdiff
path: root/include/pwrseq.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-21 19:43:31 -0700
committerSimon Glass <sjg@chromium.org>2016-01-21 20:42:34 -0700
commit5fd6badbd265ef45d3e1faebe5868426ab69595c (patch)
tree51aa4fe2fb3d0af4e3fb80a1cd1ed4ceb6a8f7c8 /include/pwrseq.h
parente1227764cdbcd397728e95de1662c2b9e967d5fe (diff)
dm: Add a power sequencing uclass
Some devices need special sequences to be used when starting up. Add a uclass for this. Drivers can be added to provide specific features as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/pwrseq.h')
-rw-r--r--include/pwrseq.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/pwrseq.h b/include/pwrseq.h
new file mode 100644
index 0000000000..b934f29fac
--- /dev/null
+++ b/include/pwrseq.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2013 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __pwrseq_h
+#define __pwrseq_h
+
+struct pwrseq_ops {
+ int (*set_power)(struct udevice *dev, bool enable);
+};
+
+#define pwrseq_get_ops(dev) ((struct pwrseq_ops *)(dev)->driver->ops)
+
+int pwrseq_set_power(struct udevice *dev, bool enable);
+
+#endif