mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: Add a power sequencing uclass
Some devices need special sequences to be used when starting up. Add a uclass for this. Drivers can be added to provide specific features as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e1227764cd
commit
5fd6badbd2
5 changed files with 62 additions and 0 deletions
18
include/pwrseq.h
Normal file
18
include/pwrseq.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2013 Google, Inc
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __pwrseq_h
|
||||
#define __pwrseq_h
|
||||
|
||||
struct pwrseq_ops {
|
||||
int (*set_power)(struct udevice *dev, bool enable);
|
||||
};
|
||||
|
||||
#define pwrseq_get_ops(dev) ((struct pwrseq_ops *)(dev)->driver->ops)
|
||||
|
||||
int pwrseq_set_power(struct udevice *dev, bool enable);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue