drivers: usb_dc_nrfx: Correct the nrfx_power driver configuration

The initial configuration provided for the nrfx_power driver cannot
contain just default values, as that mean that DC/DC converters are
to be disabled, while those converters may be (and they actually are
by default for many boards) enabled through Kconfig.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2020-10-21 17:17:21 +02:00 committed by Carles Cufí
commit a97611a399

View file

@ -1950,8 +1950,13 @@ static int usb_init(const struct device *arg)
irq_enable(USBREGULATOR_IRQn); irq_enable(USBREGULATOR_IRQn);
#endif #endif
/* Use default configuration of the nrfx_power driver. */ static const nrfx_power_config_t power_config = {
static const nrfx_power_config_t power_config = { 0 }; .dcdcen = IS_ENABLED(CONFIG_SOC_DCDC_NRF52X) ||
IS_ENABLED(CONFIG_SOC_DCDC_NRF53X_APP),
#if NRFX_POWER_SUPPORTS_DCDCEN_VDDH
.dcdcenhv = IS_ENABLED(CONFIG_SOC_DCDC_NRF53X_HV),
#endif
};
static const nrfx_power_usbevt_config_t usbevt_config = { static const nrfx_power_usbevt_config_t usbevt_config = {
.handler = usb_dc_power_event_handler .handler = usb_dc_power_event_handler