Home
last modified time | relevance | path

Searched refs:max_uv (Results 1 – 15 of 15) sorted by relevance

/Zephyr-Core-3.7.0/drivers/regulator/
Dregulator_common.c66 if ((config->min_uv > INT32_MIN) || (config->max_uv < INT32_MAX)) { in regulator_common_init()
79 } else if (current_uv > config->max_uv) { in regulator_common_init()
80 ret = regulator_set_voltage(dev, config->max_uv, config->max_uv); in regulator_common_init()
205 int32_t max_uv) in regulator_is_supported_voltage() argument
211 if ((min_uv > config->max_uv) || (max_uv < config->min_uv)) { in regulator_is_supported_voltage()
222 if ((volt_uv >= min_uv) && (volt_uv <= max_uv)) { in regulator_is_supported_voltage()
231 int32_t max_uv) in regulator_set_voltage() argument
241 if ((min_uv > config->max_uv) || (max_uv < config->min_uv)) { in regulator_set_voltage()
245 return api->set_voltage(dev, min_uv, max_uv); in regulator_set_voltage()
Dregulator_npm6001.c114 int32_t max_uv, const struct linear_range *range, in regulator_npm6001_buck012_set_voltage() argument
122 ret = linear_range_get_win_index(range, min_uv, max_uv, &idx); in regulator_npm6001_buck012_set_voltage()
168 int32_t max_uv) in regulator_npm6001_buck3_set_voltage() argument
175 ret = linear_range_get_win_index(&buck3_range, min_uv, max_uv, &idx); in regulator_npm6001_buck3_set_voltage()
211 int32_t max_uv) in regulator_npm6001_ldo0_set_voltage() argument
218 if ((min_uv <= ldo0_voltages[i].volt_uv) && (max_uv >= ldo0_voltages[i].volt_uv)) { in regulator_npm6001_ldo0_set_voltage()
320 static int regulator_npm6001_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_npm6001_set_voltage() argument
326 return regulator_npm6001_buck012_set_voltage(dev, min_uv, max_uv, &buck0_range, in regulator_npm6001_set_voltage()
330 return regulator_npm6001_buck012_set_voltage(dev, min_uv, max_uv, &buck1_range, in regulator_npm6001_set_voltage()
334 return regulator_npm6001_buck012_set_voltage(dev, min_uv, max_uv, &buck2_range, in regulator_npm6001_set_voltage()
[all …]
Dregulator_npm1300.c179 static int buck_set_voltage(const struct device *dev, uint8_t chan, int32_t min_uv, int32_t max_uv) in buck_set_voltage() argument
187 ret = linear_range_get_win_index(&buckldo_range, min_uv, max_uv, &idx); in buck_set_voltage()
212 static int ldo_set_voltage(const struct device *dev, uint8_t chan, int32_t min_uv, int32_t max_uv) in ldo_set_voltage() argument
218 ret = linear_range_get_win_index(&buckldo_range, min_uv, max_uv, &idx); in ldo_set_voltage()
227 int regulator_npm1300_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_npm1300_set_voltage() argument
233 return buck_set_voltage(dev, 0, min_uv, max_uv); in regulator_npm1300_set_voltage()
235 return buck_set_voltage(dev, 1, min_uv, max_uv); in regulator_npm1300_set_voltage()
237 return ldo_set_voltage(dev, 0, min_uv, max_uv); in regulator_npm1300_set_voltage()
239 return ldo_set_voltage(dev, 1, min_uv, max_uv); in regulator_npm1300_set_voltage()
Dregulator_rpi_pico.c49 static int regulator_rpi_pico_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_rpi_pico_set_voltage() argument
55 ret = linear_range_group_get_win_index(core_ranges, num_core_ranges, min_uv, max_uv, &idx); in regulator_rpi_pico_set_voltage()
Dregulator_max20335.c178 int32_t max_uv, const struct linear_range *range, in regulator_max20335_set_buck_ldo_voltage() argument
185 ret = linear_range_get_win_index(range, min_uv, max_uv, &idx); in regulator_max20335_set_buck_ldo_voltage()
219 static int regulator_max20335_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_max20335_set_voltage() argument
225 max_uv, in regulator_max20335_set_voltage()
Dregulator_nxp_vref.c138 int32_t min_uv, int32_t max_uv) in regulator_nxp_vref_set_voltage() argument
145 ret = linear_range_get_win_index(&utrim_range, min_uv, max_uv, &idx); in regulator_nxp_vref_set_voltage()
Dregulator_gpio.c108 static int regulator_gpio_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_gpio_set_voltage() argument
118 if (!IN_RANGE(cfg->states[state_idx * 2], min_uv, max_uv) || in regulator_gpio_set_voltage()
Dregulator_shell.c185 int32_t min_uv, max_uv; in cmd_vset() local
201 ret = strtomicro(argv[3], 'v', &max_uv); in cmd_vset()
207 max_uv = min_uv; in cmd_vset()
210 ret = regulator_set_voltage(dev, min_uv, max_uv); in cmd_vset()
Dregulator_axp192.c236 static int axp192_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in axp192_set_voltage() argument
242 LOG_INST_DBG(config->log, "voltage = [min=%d, max=%d]", min_uv, max_uv); in axp192_set_voltage()
246 min_uv, max_uv, &idx); in axp192_set_voltage()
Dregulator_da1469x.c281 int32_t max_uv) in regulator_da1469x_set_voltage() argument
290 if (max_uv < PLL_VDD_UV) { in regulator_da1469x_set_voltage()
304 min_uv, max_uv, &idx); in regulator_da1469x_set_voltage()
Dregulator_adp5360.c105 static int regulator_adp5360_set_voltage(const struct device *dev, int32_t min_uv, int32_t max_uv) in regulator_adp5360_set_voltage() argument
112 max_uv, &idx); in regulator_adp5360_set_voltage()
Dregulator_pca9420.c246 int32_t min_uv, int32_t max_uv) in regulator_pca9420_set_voltage() argument
256 max_uv, &idx); in regulator_pca9420_set_voltage()
/Zephyr-Core-3.7.0/include/zephyr/drivers/
Dregulator.h79 int32_t max_uv);
163 int32_t max_uv; member
195 .max_uv = DT_PROP_OR(node_id, regulator_max_microvolt, \
490 int32_t max_uv);
511 int32_t max_uv);
/Zephyr-Core-3.7.0/samples/shields/npm6001_ek/src/
Dmain.c156 int32_t min_uv, max_uv; in cmd_regulator_set() local
167 max_uv = (int32_t)strtoul(argv[3], NULL, 10) * 1000; in cmd_regulator_set()
169 max_uv = min_uv; in cmd_regulator_set()
172 ret = regulator_set_voltage(dev, min_uv, max_uv); in cmd_regulator_set()
/Zephyr-Core-3.7.0/tests/drivers/regulator/api/src/
Dmain.c110 zassert_equal(config->max_uv, INT32_MAX); in ZTEST()
129 zassert_equal(config->max_uv, 200); in ZTEST()