Lines Matching refs:drvdata
83 struct mop500_ab8500_drvdata *drvdata) in mop500_ab8500_set_mclk() argument
88 if (IS_ERR(drvdata->clk_ptr_intclk)) { in mop500_ab8500_set_mclk()
94 switch (drvdata->mclk_sel) { in mop500_ab8500_set_mclk()
96 clk_ptr = drvdata->clk_ptr_sysclk; in mop500_ab8500_set_mclk()
99 clk_ptr = drvdata->clk_ptr_ulpclk; in mop500_ab8500_set_mclk()
107 get_mclk_str(drvdata->mclk_sel)); in mop500_ab8500_set_mclk()
111 status = clk_set_parent(drvdata->clk_ptr_intclk, clk_ptr); in mop500_ab8500_set_mclk()
115 __func__, get_mclk_str(drvdata->mclk_sel), status); in mop500_ab8500_set_mclk()
119 __func__, get_mclk_str(drvdata->mclk_sel)); in mop500_ab8500_set_mclk()
132 struct mop500_ab8500_drvdata *drvdata = in mclk_input_control_get() local
135 ucontrol->value.enumerated.item[0] = drvdata->mclk_sel; in mclk_input_control_get()
144 struct mop500_ab8500_drvdata *drvdata = in mclk_input_control_put() local
150 if (drvdata->mclk_sel == val) in mclk_input_control_put()
153 drvdata->mclk_sel = val; in mclk_input_control_put()
362 struct mop500_ab8500_drvdata *drvdata; in mop500_ab8500_machine_init() local
368 drvdata = devm_kzalloc(dev, sizeof(struct mop500_ab8500_drvdata), in mop500_ab8500_machine_init()
371 if (!drvdata) in mop500_ab8500_machine_init()
374 snd_soc_card_set_drvdata(rtd->card, drvdata); in mop500_ab8500_machine_init()
378 drvdata->clk_ptr_sysclk = clk_get(dev, "sysclk"); in mop500_ab8500_machine_init()
379 if (IS_ERR(drvdata->clk_ptr_sysclk)) in mop500_ab8500_machine_init()
382 drvdata->clk_ptr_ulpclk = clk_get(dev, "ulpclk"); in mop500_ab8500_machine_init()
383 if (IS_ERR(drvdata->clk_ptr_ulpclk)) in mop500_ab8500_machine_init()
386 drvdata->clk_ptr_intclk = clk_get(dev, "intclk"); in mop500_ab8500_machine_init()
387 if (IS_ERR(drvdata->clk_ptr_intclk)) in mop500_ab8500_machine_init()
392 drvdata->mclk_sel = MCLK_ULPCLK; in mop500_ab8500_machine_init()
393 ret = mop500_ab8500_set_mclk(dev, drvdata); in mop500_ab8500_machine_init()
398 drvdata->mclk_sel = MCLK_ULPCLK; in mop500_ab8500_machine_init()
432 struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card); in mop500_ab8500_remove() local
434 clk_put(drvdata->clk_ptr_sysclk); in mop500_ab8500_remove()
435 clk_put(drvdata->clk_ptr_ulpclk); in mop500_ab8500_remove()
436 clk_put(drvdata->clk_ptr_intclk); in mop500_ab8500_remove()
438 snd_soc_card_set_drvdata(card, drvdata); in mop500_ab8500_remove()