soc: stm32: convert to use DEVICE_DT_GET for clocks

Convert from device_get_binding to DEVICE_DT_GET.  In doing this we
no longer need the label in the devicetree node so we remove that.

Removed all __ASSERT_NO_MSG(clk) since we'll get a build error if
DEVICE_DT_GET cant be satisfied, and the clock control api's will
handle reporting if the device_is_ready.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-02-11 11:49:24 -06:00 committed by Kumar Gala
commit b275fec8c4
40 changed files with 44 additions and 89 deletions

View file

@ -163,8 +163,7 @@ static int dmamux_stm32_init(const struct device *dev)
{
struct dmamux_stm32_data *data = dev->data;
const struct dmamux_stm32_config *config = dev->config;
const struct device *clk =
device_get_binding(STM32_CLOCK_CONTROL_NAME);
const struct device *clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
if (clock_control_on(clk,
(clock_control_subsys_t *) &config->pclken) != 0) {