• Home
  • Raw
  • Download

Lines Matching full:provider

16 #include <linux/clk-provider.h>
32 * struct sci_clk_provider - TI SCI clock provider representation
35 * @dev: Device pointer for the clock provider
37 * @num_clocks: Total number of clocks for this provider
53 * @provider: Master clock provider
61 struct sci_clk_provider *provider; member
80 return clk->provider->ops->get_clock(clk->provider->sci, clk->dev_id, in sci_clk_prepare()
97 ret = clk->provider->ops->put_clock(clk->provider->sci, clk->dev_id, in sci_clk_unprepare()
100 dev_err(clk->provider->dev, in sci_clk_unprepare()
118 ret = clk->provider->ops->is_on(clk->provider->sci, clk->dev_id, in sci_clk_is_prepared()
122 dev_err(clk->provider->dev, in sci_clk_is_prepared()
146 ret = clk->provider->ops->get_freq(clk->provider->sci, clk->dev_id, in sci_clk_recalc_rate()
149 dev_err(clk->provider->dev, in sci_clk_recalc_rate()
175 ret = clk->provider->ops->get_best_match_freq(clk->provider->sci, in sci_clk_determine_rate()
183 dev_err(clk->provider->dev, in sci_clk_determine_rate()
208 return clk->provider->ops->set_freq(clk->provider->sci, clk->dev_id, in sci_clk_set_rate()
224 ret = clk->provider->ops->get_parent(clk->provider->sci, clk->dev_id, in sci_clk_get_parent()
227 dev_err(clk->provider->dev, in sci_clk_get_parent()
247 return clk->provider->ops->set_parent(clk->provider->sci, clk->dev_id, in sci_clk_set_parent()
265 * @provider: Handle to SCI clock provider
274 static int _sci_clk_build(struct sci_clk_provider *provider, in _sci_clk_build() argument
283 name = kasprintf(GFP_KERNEL, "%s:%d:%d", dev_name(provider->dev), in _sci_clk_build()
310 dev_name(provider->dev), in _sci_clk_build()
326 ret = devm_clk_hw_register(provider->dev, &sci_clk->hw); in _sci_clk_build()
328 dev_err(provider->dev, "failed clk register with %d\n", ret); in _sci_clk_build()
359 * @data: pointer to the clock provider
368 struct sci_clk_provider *provider = data; in sci_clk_get() local
378 clk = bsearch(&key, provider->clocks, provider->num_clocks, in sci_clk_get()
411 * Probes the TI SCI clock device. Allocates a new clock provider
421 struct sci_clk_provider *provider; in ti_sci_clk_probe() local
438 provider = devm_kzalloc(dev, sizeof(*provider), GFP_KERNEL); in ti_sci_clk_probe()
439 if (!provider) in ti_sci_clk_probe()
442 provider->sci = handle; in ti_sci_clk_probe()
443 provider->ops = &handle->ops.clk_ops; in ti_sci_clk_probe()
444 provider->dev = dev; in ti_sci_clk_probe()
447 ret = provider->ops->get_num_parents(provider->sci, dev_id, in ti_sci_clk_probe()
485 sci_clk->provider = provider; in ti_sci_clk_probe()
494 provider->clocks = devm_kmalloc_array(dev, num_clks, sizeof(sci_clk), in ti_sci_clk_probe()
496 if (!provider->clocks) in ti_sci_clk_probe()
499 memcpy(provider->clocks, clks, num_clks * sizeof(sci_clk)); in ti_sci_clk_probe()
501 provider->num_clocks = num_clks; in ti_sci_clk_probe()
505 ret = ti_sci_init_clocks(provider); in ti_sci_clk_probe()
511 return of_clk_add_hw_provider(np, sci_clk_get, provider); in ti_sci_clk_probe()
518 * Removes the TI SCI device. Unregisters the clock provider registered