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