summaryrefslogtreecommitdiff
path: root/drivers/misc/pwrseq-uclass.c
blob: 8ed2ad4f930bf7c35442e91d5b0a92feac95bf60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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",
};