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 <dm.h> |
| 9 | #include <pwrseq.h> |
| 10 | |
| 11 | int 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 | |
| 21 | UCLASS_DRIVER(pwrseq) = { |
| 22 | .id = UCLASS_PWRSEQ, |
| 23 | .name = "pwrseq", |
| 24 | }; |