blob: c8f6c46069b776f8afa6779efb2f7499dcb52504 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glassc9795172016-01-21 19:43:31 -07002/*
3 * Copyright (c) 2015 Google, Inc
Simon Glassc9795172016-01-21 19:43:31 -07004 */
5
6#include <common.h>
7#include <dm.h>
8#include <pwrseq.h>
9
10int 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
20UCLASS_DRIVER(pwrseq) = {
21 .id = UCLASS_PWRSEQ,
22 .name = "pwrseq",
23};