@@ -123,7 +123,27 @@ static inline void cavs_pm_runtime_en_dmic_clk_gating(uint32_t index)
123123 index , shim_read (SHIM_CLKCTL ));
124124#endif
125125}
126+ static inline void cavs_pm_runtime_en_dmic_power (uint32_t index )
127+ {
128+ (void ) index ;
129+ #if defined(CONFIG_CANNONLAKE ) || defined(CONFIG_ICELAKE ) \
130+ || defined(CONFIG_SUECREEK )
131+ /* Enable DMIC power */
132+ io_reg_write (DMICLCTL ,
133+ (io_reg_read (DMICLCTL ) | DMICLCTL_SPA ));
134+ #endif
135+ }
136+ static inline void cavs_pm_runtime_dis_dmic_power (uint32_t index )
137+ {
138+ (void ) index ;
139+ #if defined(CONFIG_CANNONLAKE ) || defined(CONFIG_ICELAKE ) \
140+ || defined(CONFIG_SUECREEK )
141+ /* Disable DMIC power */
142+ io_reg_write (DMICLCTL ,
143+ (io_reg_read (DMICLCTL ) & (~DMICLCTL_SPA )));
126144#endif
145+ }
146+ #endif /* #if defined(CONFIG_DMIC) */
127147
128148static inline void cavs_pm_runtime_dis_dwdma_clk_gating (uint32_t index )
129149{
@@ -171,6 +191,9 @@ void platform_pm_runtime_get(enum pm_runtime_context context, uint32_t index,
171191 case DMIC_CLK :
172192 cavs_pm_runtime_dis_dmic_clk_gating (index );
173193 break ;
194+ case DMIC_POW :
195+ cavs_pm_runtime_en_dmic_power (index );
196+ break ;
174197#endif
175198 case DW_DMAC_CLK :
176199 cavs_pm_runtime_dis_dwdma_clk_gating (index );
@@ -194,6 +217,9 @@ void platform_pm_runtime_put(enum pm_runtime_context context, uint32_t index,
194217 case DMIC_CLK :
195218 cavs_pm_runtime_en_dmic_clk_gating (index );
196219 break ;
220+ case DMIC_POW :
221+ cavs_pm_runtime_dis_dmic_power (index );
222+ break ;
197223#endif
198224 case DW_DMAC_CLK :
199225 cavs_pm_runtime_en_dwdma_clk_gating (index );
0 commit comments