summaryrefslogtreecommitdiff
path: root/drivers/misc/pwrseq-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/pwrseq-uclass.c')
-rw-r--r--drivers/misc/pwrseq-uclass.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/misc/pwrseq-uclass.c b/drivers/misc/pwrseq-uclass.c
new file mode 100644
index 0000000000..8ed2ad4f93
--- /dev/null
+++ b/drivers/misc/pwrseq-uclass.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2015 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <pwrseq.h>
+
+int pwrseq_set_power(struct udevice *dev, bool enable)
+{
+ struct pwrseq_ops *ops = pwrseq_get_ops(dev);
+
+ if (!ops->set_power)
+ return -ENOSYS;
+
+ return ops->set_power(dev, enable);
+}
+
+UCLASS_DRIVER(pwrseq) = {
+ .id = UCLASS_PWRSEQ,
+ .name = "pwrseq",
+};