867c254801
The current implementation always sets the voltage before enabling, even if the current voltage is in the allowed range. This has some side effects, i.e. for PMIC regulators that are pre-programmed for a specific value but allow voltage changes during runtime. The side effect being that the regulator will always be reset to the lower value of the voltage range at init. Another usecase would be when a bootloader sets a specific voltage then loads an application that uses the same driver. The proposed fix is to evaluate the current voltage and try to bring the actual voltage in range if the current voltage is not valid according to the min/max constraints. Tested on custom SAMD20 board with a custom RK816 PMIC driver. Signed-off-by: Ionut Catalin Pavel <iocapa@iocapa.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
Kconfig.fake | ||
Kconfig.fixed | ||
Kconfig.npm1100 | ||
Kconfig.npm6001 | ||
Kconfig.pca9420 | ||
Kconfig.rpi_pico | ||
regulator_common.c | ||
regulator_fake.c | ||
regulator_fixed.c | ||
regulator_npm1100.c | ||
regulator_npm6001.c | ||
regulator_pca9420.c | ||
regulator_rpi_pico.c | ||
regulator_shell.c |