Lines Matching refs:sclk
134 static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk, in scmi_clk_ops_init() argument
144 .name = sclk->info->name, in scmi_clk_ops_init()
147 sclk->hw.init = &init; in scmi_clk_ops_init()
148 ret = devm_clk_hw_register(dev, &sclk->hw); in scmi_clk_ops_init()
152 if (sclk->info->rate_discrete) { in scmi_clk_ops_init()
153 int num_rates = sclk->info->list.num_rates; in scmi_clk_ops_init()
158 min_rate = sclk->info->list.rates[0]; in scmi_clk_ops_init()
159 max_rate = sclk->info->list.rates[num_rates - 1]; in scmi_clk_ops_init()
161 min_rate = sclk->info->range.min_rate; in scmi_clk_ops_init()
162 max_rate = sclk->info->range.max_rate; in scmi_clk_ops_init()
165 clk_hw_set_rate_range(&sclk->hw, min_rate, max_rate); in scmi_clk_ops_init()
206 struct scmi_clk *sclk; in scmi_clocks_probe() local
209 sclk = devm_kzalloc(dev, sizeof(*sclk), GFP_KERNEL); in scmi_clocks_probe()
210 if (!sclk) in scmi_clocks_probe()
213 sclk->info = scmi_proto_clk_ops->info_get(ph, idx); in scmi_clocks_probe()
214 if (!sclk->info) { in scmi_clocks_probe()
219 sclk->id = idx; in scmi_clocks_probe()
220 sclk->ph = ph; in scmi_clocks_probe()
228 sclk->info->enable_latency <= atomic_threshold) in scmi_clocks_probe()
233 err = scmi_clk_ops_init(dev, sclk, scmi_ops); in scmi_clocks_probe()
236 devm_kfree(dev, sclk); in scmi_clocks_probe()
240 sclk->info->name, in scmi_clocks_probe()
243 hws[idx] = &sclk->hw; in scmi_clocks_probe()