diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/drivers/power/regulator/regulator_common.h | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/drivers/power/regulator/regulator_common.h')
-rw-r--r-- | roms/u-boot/drivers/power/regulator/regulator_common.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roms/u-boot/drivers/power/regulator/regulator_common.h b/roms/u-boot/drivers/power/regulator/regulator_common.h new file mode 100644 index 000000000..c10492f01 --- /dev/null +++ b/roms/u-boot/drivers/power/regulator/regulator_common.h @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Disruptive Technologies Research AS + * Sven Schwermer <sven.svenschwermer@disruptive-technologies.com> + */ + +#ifndef _REGULATOR_COMMON_H +#define _REGULATOR_COMMON_H + +#include <asm/gpio.h> + +struct regulator_common_plat { + struct gpio_desc gpio; /* GPIO for regulator enable control */ + unsigned int startup_delay_us; + unsigned int off_on_delay_us; +}; + +int regulator_common_of_to_plat(struct udevice *dev, + struct regulator_common_plat *dev_pdata, const + char *enable_gpio_name); +int regulator_common_get_enable(const struct udevice *dev, + struct regulator_common_plat *dev_pdata); +int regulator_common_set_enable(const struct udevice *dev, + struct regulator_common_plat *dev_pdata, bool enable); + +#endif /* _REGULATOR_COMMON_H */ |