Lines Matching refs:synth
71 struct clk_si5341_synth synth[SI5341_NUM_SYNTH]; member
555 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_is_on() local
558 u8 index = synth->index; in si5341_synth_clk_is_on()
560 err = regmap_read(synth->data->regmap, in si5341_synth_clk_is_on()
568 err = regmap_read(synth->data->regmap, SI5341_SYNTH_N_PDNB, &val); in si5341_synth_clk_is_on()
576 err = regmap_read(synth->data->regmap, SI5341_SYNTH_N_CLK_DIS, &val); in si5341_synth_clk_is_on()
585 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_unprepare() local
586 u8 index = synth->index; /* In range 0..5 */ in si5341_synth_clk_unprepare()
590 regmap_update_bits(synth->data->regmap, in si5341_synth_clk_unprepare()
593 regmap_update_bits(synth->data->regmap, in si5341_synth_clk_unprepare()
596 regmap_update_bits(synth->data->regmap, in si5341_synth_clk_unprepare()
602 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_prepare() local
604 u8 index = synth->index; in si5341_synth_clk_prepare()
608 err = regmap_update_bits(synth->data->regmap, in si5341_synth_clk_prepare()
614 err = regmap_update_bits(synth->data->regmap, in si5341_synth_clk_prepare()
620 return regmap_update_bits(synth->data->regmap, in si5341_synth_clk_prepare()
628 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_recalc_rate() local
634 err = si5341_decode_44_32(synth->data->regmap, in si5341_synth_clk_recalc_rate()
635 SI5341_SYNTH_N_NUM(synth->index), &n_num, &n_den); in si5341_synth_clk_recalc_rate()
646 f = synth->data->freq_vco; in si5341_synth_clk_recalc_rate()
659 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_round_rate() local
663 f = synth->data->freq_vco; in si5341_synth_clk_round_rate()
668 f = synth->data->freq_vco; in si5341_synth_clk_round_rate()
676 static int si5341_synth_program(struct clk_si5341_synth *synth, in si5341_synth_program() argument
680 u8 index = synth->index; in si5341_synth_program()
682 err = si5341_encode_44_32(synth->data->regmap, in si5341_synth_program()
685 err = regmap_update_bits(synth->data->regmap, in si5341_synth_program()
690 return regmap_write(synth->data->regmap, in si5341_synth_program()
698 struct clk_si5341_synth *synth = to_clk_si5341_synth(hw); in si5341_synth_clk_set_rate() local
705 n_num = synth->data->freq_vco; in si5341_synth_clk_set_rate()
721 dev_dbg(&synth->data->i2c_client->dev, in si5341_synth_clk_set_rate()
723 synth->index, n_num, n_den, in si5341_synth_clk_set_rate()
726 return si5341_synth_program(synth, n_num, n_den, is_integer); in si5341_synth_clk_set_rate()
970 return &data->synth[idx].hw; in of_clk_si5341_get()
1542 data->synth[i].index = i; in si5341_probe()
1543 data->synth[i].data = data; in si5341_probe()
1544 data->synth[i].hw.init = &init; in si5341_probe()
1545 err = devm_clk_hw_register(&client->dev, &data->synth[i].hw); in si5341_probe()