Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | c979517 | 2016-01-21 19:43:31 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2015 Google, Inc |
Simon Glass | c979517 | 2016-01-21 19:43:31 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
Patrick Delaunay | 8131335 | 2021-04-27 11:02:19 +0200 | [diff] [blame] | 6 | #define LOG_CATEGORY UCLASS_PWRSEQ |
| 7 | |
Simon Glass | c979517 | 2016-01-21 19:43:31 -0700 | [diff] [blame] | 8 | #include <common.h> |
| 9 | #include <dm.h> |
| 10 | #include <pwrseq.h> |
| 11 | |
| 12 | int 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 | |
| 22 | UCLASS_DRIVER(pwrseq) = { |
| 23 | .id = UCLASS_PWRSEQ, |
| 24 | .name = "pwrseq", |
| 25 | }; |