Zephyr Project API
3.3.0
A Scalable Open Source RTOS
|
#include <errno.h>
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util_macro.h>
Go to the source code of this file.
Macros | |
Regulator error flags. | |
#define | REGULATOR_ERROR_OVER_VOLTAGE BIT(0) |
#define | REGULATOR_ERROR_OVER_CURRENT BIT(1) |
#define | REGULATOR_ERROR_OVER_TEMP BIT(2) |
Typedefs | |
typedef uint8_t | regulator_dvs_state_t |
typedef uint8_t | regulator_mode_t |
typedef uint8_t | regulator_error_flags_t |
Functions | |
static int | regulator_parent_dvs_state_set (const struct device *dev, regulator_dvs_state_t state) |
Set a DVS state. More... | |
int | regulator_enable (const struct device *dev) |
Enable a regulator. More... | |
bool | regulator_is_enabled (const struct device *dev) |
Check if a regulator is enabled. More... | |
int | regulator_disable (const struct device *dev) |
Disable a regulator. More... | |
static unsigned int | regulator_count_voltages (const struct device *dev) |
Obtain the number of supported voltage levels. More... | |
static int | regulator_list_voltage (const struct device *dev, unsigned int idx, int32_t *volt_uv) |
Obtain the value of a voltage given an index. More... | |
bool | regulator_is_supported_voltage (const struct device *dev, int32_t min_uv, int32_t max_uv) |
Check if a voltage within a window is supported. More... | |
int | regulator_set_voltage (const struct device *dev, int32_t min_uv, int32_t max_uv) |
Set the output voltage. More... | |
static int | regulator_get_voltage (const struct device *dev, int32_t *volt_uv) |
Obtain output voltage. More... | |
int | regulator_set_current_limit (const struct device *dev, int32_t min_ua, int32_t max_ua) |
Set output current limit. More... | |
static int | regulator_get_current_limit (const struct device *dev, int32_t *curr_ua) |
Get output current limit. More... | |
int | regulator_set_mode (const struct device *dev, regulator_mode_t mode) |
Set mode. More... | |
static int | regulator_get_mode (const struct device *dev, regulator_mode_t *mode) |
Get mode. More... | |
static int | regulator_get_error_flags (const struct device *dev, regulator_error_flags_t *flags) |
Get active error flags. More... | |