blob: a0f24e1bf3a967bc544871e54a8d0d8b6cb3ddd4 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass5fd6bad2016-01-21 19:43:31 -07002/*
3 * Copyright (c) 2015 Google, Inc
Simon Glass5fd6bad2016-01-21 19:43:31 -07004 */
5
Patrick Delaunayb953ec22021-04-27 11:02:19 +02006#define LOG_CATEGORY UCLASS_PWRSEQ
7
Simon Glass5fd6bad2016-01-21 19:43:31 -07008#include <common.h>
9#include <dm.h>
10#include <pwrseq.h>
11
12int pwrseq_set_power(struct udevice *dev, bool enable)
13{
14 struct pwrseq_ops *ops = pwrseq_get_ops(dev);
15
16 if (!ops->set_power)
17 return -ENOSYS;
18
19 return ops->set_power(dev, enable);
20}
21
22UCLASS_DRIVER(pwrseq) = {
23 .id = UCLASS_PWRSEQ,
24 .name = "pwrseq",
25};