Skip to content

Commit 909950c

Browse files
drivers: clock_control_mcux_ccm_rev2: add SAR_ADC clock support
Added SAR_ADC clock support for clock_control_mcux_ccm_rev2 Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
1 parent afe3075 commit 909950c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/clock_control/clock_control_mcux_ccm_rev2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
263263
break;
264264
#endif
265265

266+
#ifdef CONFIG_ADC_MCUX_SAR_ADC
267+
case IMX_CCM_SAR_ADC1_CLK:
268+
clock_root = kCLOCK_Root_Adc + instance;
269+
break;
270+
#endif
271+
266272
#if defined(CONFIG_ETH_NXP_IMX_NETC)
267273
case IMX_CCM_NETC_CLK:
268274
clock_root = kCLOCK_Root_Netc;

include/zephyr/dt-bindings/clock/imx_ccm_rev2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
/* ADC */
122122
#define IMX_CCM_LPADC1_CLK 0x1500UL
123123
#define IMX_CCM_LPADC2_CLK 0x1501UL
124+
#define IMX_CCM_SAR_ADC1_CLK 0x1500UL
124125

125126
/* TPM */
126127
#define IMX_CCM_TPM_CLK 0x1600UL

0 commit comments

Comments
 (0)