Commit ba6138d1 authored by Kumar Gala's avatar Kumar Gala Committed by Anas Nashif
Browse files

drivers: clock_control: npcx: Convert to use DEVICE_DT_INST_DEFINE



The NPCX clock driver was already using devicetree, just need to make a
small tweak to use DEVICE_DT_INST_DEFINE and update NPCX_CLK_CTRL_NAME
to match the label for the "nuvoton,npcx-pcc" clock controller.

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent f6b7dd09
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ const struct npcx_pcc_config pcc_config = {
	.base_pmc  = DT_INST_REG_ADDR_BY_NAME(0, pmc),
};

DEVICE_DEFINE(npcx_cdcg, NPCX_CLK_CTRL_NAME,
DEVICE_DT_INST_DEFINE(0,
		    &npcx_clock_control_init,
		    device_pm_control_nop,
		    NULL, &pcc_config,
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ extern "C" {
#endif

/* Common clock control device name for all NPCX series */
#define NPCX_CLK_CTRL_NAME "npcx-cc"
#define NPCX_CLK_CTRL_NAME DT_LABEL(DT_NODELABEL(pcc))

/**
 * @brief NPCX clock configuration structure