xref: /openbmc/u-boot/drivers/misc/pwrseq-uclass.c (revision 1a68faac)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (c) 2015 Google, Inc
4  */
5 
6 #include <common.h>
7 #include <dm.h>
8 #include <pwrseq.h>
9 
10 int pwrseq_set_power(struct udevice *dev, bool enable)
11 {
12 	struct pwrseq_ops *ops = pwrseq_get_ops(dev);
13 
14 	if (!ops->set_power)
15 		return -ENOSYS;
16 
17 	return ops->set_power(dev, enable);
18 }
19 
20 UCLASS_DRIVER(pwrseq) = {
21 	.id		= UCLASS_PWRSEQ,
22 	.name		= "pwrseq",
23 };
24