Lines Matching refs:wm831x

18 	struct wm831x *wm831x;  member
70 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_is_prepared() local
73 ret = wm831x_reg_read(wm831x, WM831X_FLL_CONTROL_1); in wm831x_fll_is_prepared()
75 dev_err(wm831x->dev, "Unable to read FLL_CONTROL_1: %d\n", in wm831x_fll_is_prepared()
87 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_prepare() local
90 ret = wm831x_set_bits(wm831x, WM831X_FLL_CONTROL_1, in wm831x_fll_prepare()
93 dev_crit(wm831x->dev, "Failed to enable FLL: %d\n", ret); in wm831x_fll_prepare()
105 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_unprepare() local
108 ret = wm831x_set_bits(wm831x, WM831X_FLL_CONTROL_1, WM831X_FLL_ENA, 0); in wm831x_fll_unprepare()
110 dev_crit(wm831x->dev, "Failed to disable FLL: %d\n", ret); in wm831x_fll_unprepare()
118 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_recalc_rate() local
121 ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2); in wm831x_fll_recalc_rate()
123 dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_2: %d\n", in wm831x_fll_recalc_rate()
131 dev_err(wm831x->dev, "FLL only supported in AUTO mode\n"); in wm831x_fll_recalc_rate()
155 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_set_rate() local
167 return wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_2, in wm831x_fll_set_rate()
180 struct wm831x *wm831x = clkdata->wm831x; in wm831x_fll_get_parent() local
184 ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2); in wm831x_fll_get_parent()
186 dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_2: %d\n", in wm831x_fll_get_parent()
194 ret = wm831x_reg_read(wm831x, WM831X_FLL_CONTROL_5); in wm831x_fll_get_parent()
196 dev_err(wm831x->dev, "Unable to read FLL_CONTROL_5: %d\n", in wm831x_fll_get_parent()
207 dev_err(wm831x->dev, "Unsupported FLL clock source %d\n", in wm831x_fll_get_parent()
235 struct wm831x *wm831x = clkdata->wm831x; in wm831x_clkout_is_prepared() local
238 ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_1); in wm831x_clkout_is_prepared()
240 dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_1: %d\n", in wm831x_clkout_is_prepared()
252 struct wm831x *wm831x = clkdata->wm831x; in wm831x_clkout_prepare() local
255 ret = wm831x_reg_unlock(wm831x); in wm831x_clkout_prepare()
257 dev_crit(wm831x->dev, "Failed to lock registers: %d\n", ret); in wm831x_clkout_prepare()
261 ret = wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_1, in wm831x_clkout_prepare()
264 dev_crit(wm831x->dev, "Failed to enable CLKOUT: %d\n", ret); in wm831x_clkout_prepare()
266 wm831x_reg_lock(wm831x); in wm831x_clkout_prepare()
275 struct wm831x *wm831x = clkdata->wm831x; in wm831x_clkout_unprepare() local
278 ret = wm831x_reg_unlock(wm831x); in wm831x_clkout_unprepare()
280 dev_crit(wm831x->dev, "Failed to lock registers: %d\n", ret); in wm831x_clkout_unprepare()
284 ret = wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_1, in wm831x_clkout_unprepare()
287 dev_crit(wm831x->dev, "Failed to disable CLKOUT: %d\n", ret); in wm831x_clkout_unprepare()
289 wm831x_reg_lock(wm831x); in wm831x_clkout_unprepare()
301 struct wm831x *wm831x = clkdata->wm831x; in wm831x_clkout_get_parent() local
304 ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_1); in wm831x_clkout_get_parent()
306 dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_1: %d\n", in wm831x_clkout_get_parent()
321 struct wm831x *wm831x = clkdata->wm831x; in wm831x_clkout_set_parent() local
323 return wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_1, in wm831x_clkout_set_parent()
346 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_clk_probe() local
354 clkdata->wm831x = wm831x; in wm831x_clk_probe()
357 ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2); in wm831x_clk_probe()
359 dev_err(wm831x->dev, "Unable to read CLOCK_CONTROL_2: %d\n", in wm831x_clk_probe()