drivers: clock_control: stm32_mux: Fix src clock configuration
In order to configure domain clock, clock_control_configure should be used instead of clock_control_on which is only useful for bus clock gating. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
cf84395f7b
commit
4a0032ddc1
|
@ -25,8 +25,8 @@ static int stm32_clk_mux_init(const struct device *dev)
|
|||
{
|
||||
const struct stm32_clk_mux_config *cfg = dev->config;
|
||||
|
||||
if (clock_control_on(DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE),
|
||||
(clock_control_subsys_t) &cfg->pclken) != 0) {
|
||||
if (clock_control_configure(DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE),
|
||||
(clock_control_subsys_t) &cfg->pclken, NULL) != 0) {
|
||||
LOG_ERR("Could not enable clock mux");
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue