blob: bddc3c3368572eed3f48608765f5d0276125c9f2 [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
Patrick Delaunay81313352021-04-27 11:02:19 +02006#define LOG_CATEGORY UCLASS_PWRSEQ
7
Simon Glassc9795172016-01-21 19:43:31 -07008#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};