/Zephyr-Core-3.4.0/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-Core-3.4.0/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_shell.c | 147 int32_t volt_uv; in cmd_vlist() local 149 (void)regulator_list_voltage(dev, i, &volt_uv); in cmd_vlist() 152 if ((i == 0U) || (last_volt_uv != volt_uv)) { in cmd_vlist() 153 microtoshell(sh, 'V', volt_uv); in cmd_vlist() 156 last_volt_uv = volt_uv; in cmd_vlist() 202 int32_t volt_uv; in cmd_vget() local 213 ret = regulator_get_voltage(dev, &volt_uv); in cmd_vget() 219 microtoshell(sh, 'V', volt_uv); in cmd_vget()
|
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_npm1300.c | 143 int regulator_npm1300_list_voltage(const struct device *dev, unsigned int idx, int32_t *volt_uv) in regulator_npm1300_list_voltage() argument 152 return linear_range_get_value(&buckldo_range, idx, volt_uv); in regulator_npm1300_list_voltage() 240 static int buck_get_voltage(const struct device *dev, uint8_t chan, int32_t *volt_uv) in buck_get_voltage() argument 264 return linear_range_get_value(&buckldo_range, idx, volt_uv); in buck_get_voltage() 267 static int ldo_get_voltage(const struct device *dev, uint8_t chan, int32_t *volt_uv) in ldo_get_voltage() argument 278 return linear_range_get_value(&buckldo_range, idx, volt_uv); in ldo_get_voltage() 281 int regulator_npm1300_get_voltage(const struct device *dev, int32_t *volt_uv) in regulator_npm1300_get_voltage() argument 287 return buck_get_voltage(dev, 0, volt_uv); in regulator_npm1300_get_voltage() 289 return buck_get_voltage(dev, 1, volt_uv); in regulator_npm1300_get_voltage() 291 return ldo_get_voltage(dev, 0, volt_uv); in regulator_npm1300_get_voltage() [all …]
|
D | regulator_common.c | 185 int32_t volt_uv; in regulator_is_supported_voltage() local 187 (void)regulator_list_voltage(dev, idx, &volt_uv); in regulator_is_supported_voltage() 189 if ((volt_uv >= min_uv) && (volt_uv <= max_uv)) { in regulator_is_supported_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_pca9420.c | 205 unsigned int idx, int32_t *volt_uv) in regulator_pca9420_list_voltage() argument 211 volt_uv); in regulator_pca9420_list_voltage() 238 int32_t *volt_uv) in regulator_pca9420_get_voltage() argument 257 volt_uv); in regulator_pca9420_get_voltage()
|
/Zephyr-Core-3.4.0/tests/drivers/regulator/api/src/ |
D | main.c | 178 int32_t *volt_uv) in list_voltage_ok() argument 183 *volt_uv = 100; in list_voltage_ok() 190 int32_t volt_uv; in ZTEST() local 196 zassert_equal(regulator_list_voltage(reg0, 0, &volt_uv), 0); in ZTEST() 197 zassert_equal(volt_uv, 100); in ZTEST() 201 zassert_equal(regulator_fake_list_voltage_fake.arg2_val, &volt_uv); in ZTEST() 205 int32_t *volt_uv) in list_voltage_invalid() argument 209 ARG_UNUSED(volt_uv); in list_voltage_invalid() 228 int32_t *volt_uv) in list_voltage() argument 234 *volt_uv = 100; in list_voltage() [all …]
|
/Zephyr-Core-3.4.0/include/zephyr/drivers/ |
D | regulator.h | 70 unsigned int idx, int32_t *volt_uv); 74 int32_t *volt_uv); 365 unsigned int idx, int32_t *volt_uv) in regulator_list_voltage() argument 374 return api->list_voltage(dev, idx, volt_uv); in regulator_list_voltage() 422 int32_t *volt_uv) in regulator_get_voltage() argument 431 return api->get_voltage(dev, volt_uv); in regulator_get_voltage()
|
/Zephyr-Core-3.4.0/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()
|