blob: 8ed2ad4f930bf7c35442e91d5b0a92feac95bf60 [file] [log] [blame]
Simon Glass5fd6bad2016-01-21 19:43:31 -07001/*
2 * Copyright (c) 2015 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <pwrseq.h>
10
11int pwrseq_set_power(struct udevice *dev, bool enable)
12{
13 struct pwrseq_ops *ops = pwrseq_get_ops(dev);
14
15 if (!ops->set_power)
16 return -ENOSYS;
17
18 return ops->set_power(dev, enable);
19}
20
21UCLASS_DRIVER(pwrseq) = {
22 .id = UCLASS_PWRSEQ,
23 .name = "pwrseq",
24};