Zephyr Project API  3.2.0
A Scalable Open Source RTOS
consumer.h
Go to the documentation of this file.
1
16#ifndef ZEPHYR_INCLUDE_DRIVERS_PMIC_CONSUMER_H_
17#define ZEPHYR_INCLUDE_DRIVERS_PMIC_CONSUMER_H_
18
19#include <zephyr/types.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
35int regulator_count_voltages(const struct device *dev);
36
46int regulator_list_voltages(const struct device *dev, unsigned int selector);
47
56int regulator_is_supported_voltage(const struct device *dev, int min_uV, int max_uV);
57
65int regulator_set_voltage(const struct device *dev, int min_uV, int max_uV);
66
74int regulator_get_voltage(const struct device *dev);
75
84int regulator_set_current_limit(const struct device *dev, int min_uA, int max_uA);
85
92int regulator_get_current_limit(const struct device *dev);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
int regulator_get_voltage(const struct device *dev)
Get regulator output voltage. Returns the current regulator voltage in microvolts.
int regulator_count_voltages(const struct device *dev)
Return the number of supported voltage levels Returns the number of selectors, or negative errno....
int regulator_list_voltages(const struct device *dev, unsigned int selector)
Return supported voltage Returns a voltage that can be passed to regulator_set_voltage(),...
int regulator_is_supported_voltage(const struct device *dev, int min_uV, int max_uV)
Check if a voltage range can be supported.
int regulator_set_current_limit(const struct device *dev, int min_uA, int max_uA)
Set regulator output current limit Sets current sink to desired output current.
int regulator_get_current_limit(const struct device *dev)
Get regulator output current. Note the current limit must have been set for this call to succeed.
int regulator_set_voltage(const struct device *dev, int min_uV, int max_uV)
Set regulator output voltage. Sets a regulator to the closest supported output voltage.
API for voltage and current regulators.
Runtime device structure (in ROM) per driver instance.
Definition: device.h:435