• Home
  • Raw
  • Download

Lines Matching refs:osc

23 #define to_vexpress_osc(osc) container_of(osc, struct vexpress_osc, hw)  argument
28 struct vexpress_osc *osc = to_vexpress_osc(hw); in vexpress_osc_recalc_rate() local
31 regmap_read(osc->reg, 0, &rate); in vexpress_osc_recalc_rate()
39 struct vexpress_osc *osc = to_vexpress_osc(hw); in vexpress_osc_round_rate() local
41 if (osc->rate_min && rate < osc->rate_min) in vexpress_osc_round_rate()
42 rate = osc->rate_min; in vexpress_osc_round_rate()
44 if (osc->rate_max && rate > osc->rate_max) in vexpress_osc_round_rate()
45 rate = osc->rate_max; in vexpress_osc_round_rate()
53 struct vexpress_osc *osc = to_vexpress_osc(hw); in vexpress_osc_set_rate() local
55 return regmap_write(osc->reg, 0, rate); in vexpress_osc_set_rate()
68 struct vexpress_osc *osc; in vexpress_osc_probe() local
72 osc = devm_kzalloc(&pdev->dev, sizeof(*osc), GFP_KERNEL); in vexpress_osc_probe()
73 if (!osc) in vexpress_osc_probe()
76 osc->reg = devm_regmap_init_vexpress_config(&pdev->dev); in vexpress_osc_probe()
77 if (IS_ERR(osc->reg)) in vexpress_osc_probe()
78 return PTR_ERR(osc->reg); in vexpress_osc_probe()
82 osc->rate_min = range[0]; in vexpress_osc_probe()
83 osc->rate_max = range[1]; in vexpress_osc_probe()
94 osc->hw.init = &init; in vexpress_osc_probe()
96 ret = devm_clk_hw_register(&pdev->dev, &osc->hw); in vexpress_osc_probe()
100 devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, &osc->hw); in vexpress_osc_probe()
101 clk_hw_set_rate_range(&osc->hw, osc->rate_min, osc->rate_max); in vexpress_osc_probe()