Lines Matching refs:osc
23 #define to_vexpress_osc(osc) container_of(osc, struct vexpress_osc, hw)
28 struct vexpress_osc *osc = to_vexpress_osc(hw);
31 regmap_read(osc->reg, 0, &rate);
39 struct vexpress_osc *osc = to_vexpress_osc(hw);
41 if (osc->rate_min && rate < osc->rate_min)
42 rate = osc->rate_min;
44 if (osc->rate_max && rate > osc->rate_max)
45 rate = osc->rate_max;
53 struct vexpress_osc *osc = to_vexpress_osc(hw);
55 return regmap_write(osc->reg, 0, rate);
68 struct vexpress_osc *osc;
72 osc = devm_kzalloc(&pdev->dev, sizeof(*osc), GFP_KERNEL);
73 if (!osc)
76 osc->reg = devm_regmap_init_vexpress_config(&pdev->dev);
77 if (IS_ERR(osc->reg))
78 return PTR_ERR(osc->reg);
82 osc->rate_min = range[0];
83 osc->rate_max = range[1];
94 osc->hw.init = &init;
96 ret = devm_clk_hw_register(&pdev->dev, &osc->hw);
100 devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, &osc->hw);
101 clk_hw_set_rate_range(&osc->hw, osc->rate_min, osc->rate_max);
109 { .compatible = "arm,vexpress-osc", },
116 .name = "vexpress-osc",