Lines Matching full:mclk
214 * @i2smclk: master clock from I2S mclk provider
338 struct stm32_i2smclk_data *mclk = to_mclk_data(hw); in stm32_i2smclk_round_rate() local
339 struct stm32_i2s_data *i2s = mclk->i2s_data; in stm32_i2smclk_round_rate()
346 mclk->freq = *prate / i2s->divider; in stm32_i2smclk_round_rate()
348 return mclk->freq; in stm32_i2smclk_round_rate()
354 struct stm32_i2smclk_data *mclk = to_mclk_data(hw); in stm32_i2smclk_recalc_rate() local
356 return mclk->freq; in stm32_i2smclk_recalc_rate()
362 struct stm32_i2smclk_data *mclk = to_mclk_data(hw); in stm32_i2smclk_set_rate() local
363 struct stm32_i2s_data *i2s = mclk->i2s_data; in stm32_i2smclk_set_rate()
374 mclk->freq = rate; in stm32_i2smclk_set_rate()
381 struct stm32_i2smclk_data *mclk = to_mclk_data(hw); in stm32_i2smclk_enable() local
382 struct stm32_i2s_data *i2s = mclk->i2s_data; in stm32_i2smclk_enable()
392 struct stm32_i2smclk_data *mclk = to_mclk_data(hw); in stm32_i2smclk_disable() local
393 struct stm32_i2s_data *i2s = mclk->i2s_data; in stm32_i2smclk_disable()
411 struct stm32_i2smclk_data *mclk; in stm32_i2s_add_mclk_provider() local
417 mclk = devm_kzalloc(dev, sizeof(*mclk), GFP_KERNEL); in stm32_i2s_add_mclk_provider()
418 if (!mclk) in stm32_i2s_add_mclk_provider()
427 * Forge mclk clock name from parent clock name and suffix. in stm32_i2s_add_mclk_provider()
437 mclk->hw.init = CLK_HW_INIT(mclk_name, pname, &mclk_ops, 0); in stm32_i2s_add_mclk_provider()
438 mclk->i2s_data = i2s; in stm32_i2s_add_mclk_provider()
439 hw = &mclk->hw; in stm32_i2s_add_mclk_provider()
444 dev_err(dev, "mclk register fails with error %d\n", ret); in stm32_i2s_add_mclk_provider()
449 /* register mclk provider */ in stm32_i2s_add_mclk_provider()
620 dev_dbg(cpu_dai->dev, "I2S MCLK frequency is %uHz. mode: %s, dir: %s\n", in stm32_i2s_set_sysclk()
624 /* MCLK generation is available only in master mode */ in stm32_i2s_set_sysclk()
627 dev_dbg(cpu_dai->dev, "No MCLK registered\n"); in stm32_i2s_set_sysclk()
633 /* Release mclk rate only if rate was actually set */ in stm32_i2s_set_sysclk()
648 dev_err(cpu_dai->dev, "Could not set mclk rate\n"); in stm32_i2s_set_sysclk()
681 * mclk on in stm32_i2s_configure_clock()
684 * mclk off in stm32_i2s_configure_clock()
1065 /* Register mclk provider if requested */ in stm32_i2s_parse_dt()