Lines Matching full:mclk
36 struct clk *mclk; member
371 dev_err(component->dev, "Unsupported mclk/lrclk rate\n"); in cs4234_dai_hw_params()
427 /* Scale MCLK rate by 64 to avoid overflow in the ratnum calculation */
448 int mclk = cs4234->mclk_rate; in cs4234_dai_rule_rate() local
451 .min = mclk / clamp(mclk / 30000, 256, 512), in cs4234_dai_rule_rate()
452 .max = mclk / clamp(mclk / 50000, 256, 512), in cs4234_dai_rule_rate()
455 .min = mclk / clamp(mclk / 60000, 128, 256), in cs4234_dai_rule_rate()
456 .max = mclk / clamp(mclk / 100000, 128, 256), in cs4234_dai_rule_rate()
515 * MCLK/rate may be a valid ratio but out-of-spec (e.g. 24576000/64000) in cs4234_dai_startup()
516 * so this rule limits the range of sample rate for given MCLK. in cs4234_dai_startup()
701 clk_disable_unprepare(cs4234->mclk); in cs4234_shutdown()
708 ret = clk_prepare_enable(cs4234->mclk); in cs4234_powerup()
710 dev_err(cs4234->dev, "Failed to enable mclk: %d\n", ret); in cs4234_powerup()
717 clk_disable_unprepare(cs4234->mclk); in cs4234_powerup()
724 /* Make sure hardware reset done 2 ms + (3000/MCLK) */ in cs4234_powerup()
767 cs4234->mclk = devm_clk_get(dev, "mclk"); in cs4234_i2c_probe()
768 if (IS_ERR(cs4234->mclk)) { in cs4234_i2c_probe()
769 ret = PTR_ERR(cs4234->mclk); in cs4234_i2c_probe()
770 dev_err(dev, "Failed to get the mclk: %d\n", ret); in cs4234_i2c_probe()
773 cs4234->mclk_rate = clk_get_rate(cs4234->mclk); in cs4234_i2c_probe()