/Zephyr-latest/tests/drivers/regulator/voltage/src/ |
D | main.c | 49 int32_t volt_uv; in ZTEST() local 66 (void)regulator_list_voltage(regs[i], j, &volt_uv); in ZTEST() 69 volt_uv, volt_uv)) { in ZTEST() 73 if ((volt_uv < min_microvolt) || (volt_uv > max_microvolt)) { in ZTEST() 74 TC_PRINT("Skip: %d uV\n", volt_uv); in ZTEST() 78 ret = regulator_set_voltage(regs[i], volt_uv, volt_uv); in ZTEST() 97 TC_PRINT("Set: %d, read: %d uV\n", volt_uv, in ZTEST() 101 volt_uv - tols[i], in ZTEST() 102 volt_uv + tols[i]); in ZTEST()
|
/Zephyr-latest/drivers/regulator/ |
D | regulator_npm6001.c | 84 int32_t volt_uv; member 102 int32_t *volt_uv) in regulator_npm6001_ldo0_list_voltage() argument 108 *volt_uv = ldo0_voltages[idx].volt_uv; in regulator_npm6001_ldo0_list_voltage() 218 if ((min_uv <= ldo0_voltages[i].volt_uv) && (max_uv >= ldo0_voltages[i].volt_uv)) { in regulator_npm6001_ldo0_set_voltage() 233 uint8_t vout_reg, int32_t *volt_uv) in regulator_npm6001_buck0123_get_voltage() argument 244 return linear_range_get_value(range, idx, volt_uv); in regulator_npm6001_buck0123_get_voltage() 247 static int regulator_npm6001_ldo0_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_npm6001_ldo0_get_voltage() argument 260 *volt_uv = ldo0_voltages[i].volt_uv; in regulator_npm6001_ldo0_get_voltage() 295 int32_t *volt_uv) in regulator_npm6001_list_voltage() argument 301 return linear_range_get_value(&buck0_range, idx, volt_uv); in regulator_npm6001_list_voltage() [all …]
|
D | regulator_rpi_pico.c | 44 int32_t *volt_uv) in regulator_rpi_pico_list_voltage() argument 46 return linear_range_group_get_value(core_ranges, num_core_ranges, idx, volt_uv); in regulator_rpi_pico_list_voltage() 66 static int regulator_rpi_pico_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_rpi_pico_get_voltage() argument 74 volt_uv); in regulator_rpi_pico_get_voltage()
|
D | regulator_nxp_vref.c | 134 unsigned int idx, int32_t *volt_uv) in regulator_nxp_vref_list_voltage() argument 136 return linear_range_get_value(&utrim_range, idx, volt_uv); in regulator_nxp_vref_list_voltage() 159 int32_t *volt_uv) in regulator_nxp_vref_get_voltage() argument 169 ret = linear_range_get_value(&utrim_range, idx, volt_uv); in regulator_nxp_vref_get_voltage()
|
D | regulator_npm1300.c | 114 int regulator_npm1300_list_voltage(const struct device *dev, unsigned int idx, int32_t *volt_uv) in regulator_npm1300_list_voltage() argument 123 return linear_range_get_value(&buckldo_range, idx, volt_uv); in regulator_npm1300_list_voltage() 245 static int buck_get_voltage(const struct device *dev, uint8_t chan, int32_t *volt_uv) in buck_get_voltage() argument 256 return linear_range_get_value(&buckldo_range, idx, volt_uv); in buck_get_voltage() 259 static int ldo_get_voltage(const struct device *dev, uint8_t chan, int32_t *volt_uv) in ldo_get_voltage() argument 271 return linear_range_get_value(&buckldo_range, idx, volt_uv); in ldo_get_voltage() 274 int regulator_npm1300_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_npm1300_get_voltage() argument 280 return buck_get_voltage(dev, 0, volt_uv); in regulator_npm1300_get_voltage() 282 return buck_get_voltage(dev, 1, volt_uv); in regulator_npm1300_get_voltage() 284 return ldo_get_voltage(dev, 0, volt_uv); in regulator_npm1300_get_voltage() [all …]
|
D | regulator_max20335.c | 170 int32_t *volt_uv) in regulator_max20335_list_voltage() argument 174 return linear_range_get_value(config->desc->uv_range, idx, volt_uv); in regulator_max20335_list_voltage() 195 uint8_t vout_reg, int32_t *volt_uv) in regulator_max20335_buck12_ldo123_get_voltage() argument 206 return linear_range_get_value(range, idx, volt_uv); in regulator_max20335_buck12_ldo123_get_voltage() 209 static int regulator_max20335_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_max20335_get_voltage() argument 216 volt_uv); in regulator_max20335_get_voltage()
|
D | regulator_gpio.c | 95 static int regulator_gpio_list_voltage(const struct device *dev, unsigned int idx, int32_t *volt_uv) in regulator_gpio_list_voltage() argument 104 *volt_uv = cfg->states[idx * 2]; in regulator_gpio_list_voltage() 145 static int regulator_gpio_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_gpio_get_voltage() argument 149 *volt_uv = data->current_volt_uv; in regulator_gpio_get_voltage()
|
D | regulator_shell.c | 167 int32_t volt_uv; in cmd_vlist() local 169 (void)regulator_list_voltage(dev, i, &volt_uv); in cmd_vlist() 172 if ((i == 0U) || (last_volt_uv != volt_uv)) { in cmd_vlist() 173 microtoshell(sh, 'V', volt_uv); in cmd_vlist() 176 last_volt_uv = volt_uv; in cmd_vlist() 222 int32_t volt_uv; in cmd_vget() local 233 ret = regulator_get_voltage(dev, &volt_uv); in cmd_vget() 239 microtoshell(sh, 'V', volt_uv); in cmd_vget()
|
D | regulator_fixed.c | 64 int32_t *volt_uv) in regulator_fixed_list_voltage() argument 70 if (regulator_common_get_min_voltage(dev, volt_uv) < 0) { in regulator_fixed_list_voltage()
|
D | regulator_common.c | 218 int32_t volt_uv; in regulator_is_supported_voltage() local 220 (void)regulator_list_voltage(dev, idx, &volt_uv); in regulator_is_supported_voltage() 222 if ((volt_uv >= min_uv) && (volt_uv <= max_uv)) { in regulator_is_supported_voltage()
|
D | regulator_npm2100.c | 155 int32_t *volt_uv) in regulator_npm2100_list_voltage() argument 161 return linear_range_get_value(&boost_range, idx, volt_uv); in regulator_npm2100_list_voltage() 163 return linear_range_get_value(&ldosw_range, idx, volt_uv); in regulator_npm2100_list_voltage() 203 static int regulator_npm2100_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_npm2100_get_voltage() argument 223 return linear_range_get_value(&boost_range, idx, volt_uv); in regulator_npm2100_get_voltage() 239 return linear_range_get_value(&vset0_range, idx, volt_uv); in regulator_npm2100_get_voltage() 249 volt_uv); in regulator_npm2100_get_voltage() 257 return linear_range_get_value(&ldosw_range, idx, volt_uv); in regulator_npm2100_get_voltage()
|
D | regulator_adp5360.c | 97 int32_t *volt_uv) in regulator_adp5360_list_voltage() argument 102 volt_uv); in regulator_adp5360_list_voltage() 122 static int regulator_adp5360_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_adp5360_get_voltage() argument 136 volt_uv); in regulator_adp5360_get_voltage()
|
D | regulator_axp192.c | 228 static int axp192_list_voltage(const struct device *dev, unsigned int idx, int32_t *volt_uv) in axp192_list_voltage() argument 233 volt_uv); in axp192_list_voltage() 265 static int axp192_get_voltage(const struct device *dev, int32_t *volt_uv) in axp192_get_voltage() argument 280 volt_uv); in axp192_get_voltage()
|
D | regulator_da1469x.c | 267 int32_t *volt_uv) in regulator_da1469x_list_voltage() argument 274 idx, volt_uv); in regulator_da1469x_list_voltage() 322 int32_t *volt_uv) in regulator_da1469x_get_voltage() argument 334 config->desc->voltage_range_count, idx, volt_uv); in regulator_da1469x_get_voltage()
|
D | regulator_pca9420.c | 236 unsigned int idx, int32_t *volt_uv) in regulator_pca9420_list_voltage() argument 242 volt_uv); in regulator_pca9420_list_voltage() 269 int32_t *volt_uv) in regulator_pca9420_get_voltage() argument 288 volt_uv); in regulator_pca9420_get_voltage()
|
/Zephyr-latest/tests/drivers/regulator/api/src/ |
D | main.c | 215 static int list_voltage_ok(const struct device *dev, unsigned int idx, int32_t *volt_uv) in list_voltage_ok() argument 220 *volt_uv = 100; in list_voltage_ok() 227 int32_t volt_uv; in ZTEST() local 233 zassert_equal(regulator_list_voltage(reg0, 0, &volt_uv), 0); in ZTEST() 234 zassert_equal(volt_uv, 100); in ZTEST() 238 zassert_equal(regulator_fake_list_voltage_fake.arg2_val, &volt_uv); in ZTEST() 241 static int list_voltage_invalid(const struct device *dev, unsigned int idx, int32_t *volt_uv) in list_voltage_invalid() argument 245 ARG_UNUSED(volt_uv); in list_voltage_invalid() 263 static int list_voltage(const struct device *dev, unsigned int idx, int32_t *volt_uv) in list_voltage() argument 269 *volt_uv = 100; in list_voltage() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | regulator.h | 77 unsigned int idx, int32_t *volt_uv); 81 int32_t *volt_uv); 489 unsigned int idx, int32_t *volt_uv) in regulator_list_voltage() argument 498 return api->list_voltage(dev, idx, volt_uv); in regulator_list_voltage() 546 int32_t *volt_uv) in regulator_get_voltage() argument 555 return api->get_voltage(dev, volt_uv); in regulator_get_voltage()
|
/Zephyr-latest/samples/shields/npm6001_ek/src/ |
D | main.c | 100 int32_t volt_uv; in cmd_regulator_voltages() local 102 (void)regulator_list_voltage(dev, i, &volt_uv); in cmd_regulator_voltages() 103 shell_print(sh, "%d mV", volt_uv / 1000); in cmd_regulator_voltages() 184 int32_t volt_uv; in cmd_regulator_get() local 195 ret = regulator_get_voltage(dev, &volt_uv); in cmd_regulator_get() 201 shell_print(sh, "%d mV", volt_uv / 1000); in cmd_regulator_get()
|