Lines Matching refs:num

46 	unsigned char			num;  member
122 static inline u8 si5351_msynth_params_address(int num) in si5351_msynth_params_address() argument
124 if (num > 5) in si5351_msynth_params_address()
125 return SI5351_CLK6_PARAMETERS + (num - 6); in si5351_msynth_params_address()
126 return SI5351_CLK0_PARAMETERS + (SI5351_PARAMETERS_LENGTH * num); in si5351_msynth_params_address()
366 int num, enum si5351_pll_src parent) in _si5351_pll_reparent() argument
368 u8 mask = (num == 0) ? SI5351_PLLA_SOURCE : SI5351_PLLB_SOURCE; in _si5351_pll_reparent()
373 if (num > 2) in _si5351_pll_reparent()
389 u8 mask = (hwdata->num == 0) ? SI5351_PLLA_SOURCE : SI5351_PLLB_SOURCE; in si5351_pll_get_parent()
409 return _si5351_pll_reparent(hwdata->drvdata, hwdata->num, in si5351_pll_set_parent()
419 u8 reg = (hwdata->num == 0) ? SI5351_PLLA_PARAMETERS : in si5351_pll_recalc_rate()
511 u8 reg = (hwdata->num == 0) ? SI5351_PLLA_PARAMETERS : in si5351_pll_set_rate()
518 si5351_set_bits(hwdata->drvdata, SI5351_CLK6_CTRL + hwdata->num, in si5351_pll_set_rate()
523 if (pdata->pll_reset[hwdata->num]) in si5351_pll_set_rate()
525 hwdata->num == 0 ? SI5351_PLL_RESET_A : in si5351_pll_set_rate()
569 int num, enum si5351_multisynth_src parent) in _si5351_msynth_reparent() argument
574 if (num > 8) in _si5351_msynth_reparent()
577 si5351_set_bits(drvdata, SI5351_CLK0_CTRL + num, SI5351_CLK_PLL_SELECT, in _si5351_msynth_reparent()
589 val = si5351_reg_read(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num); in si5351_msynth_get_parent()
599 return _si5351_msynth_reparent(hwdata->drvdata, hwdata->num, in si5351_msynth_set_parent()
609 u8 reg = si5351_msynth_params_address(hwdata->num); in si5351_msynth_recalc_rate()
621 if (hwdata->num > 5) { in si5351_msynth_recalc_rate()
659 if (hwdata->num >= 6 && rate > SI5351_MULTISYNTH67_MAX_FREQ) in si5351_msynth_determine_rate()
689 } else if (hwdata->num >= 6) { in si5351_msynth_determine_rate()
741 } else if (hwdata->num >= 6) { in si5351_msynth_determine_rate()
768 u8 reg = si5351_msynth_params_address(hwdata->num); in si5351_msynth_set_rate()
778 if (hwdata->num < 6) { in si5351_msynth_set_rate()
782 si5351_set_bits(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num, in si5351_msynth_set_rate()
808 int num, enum si5351_clkout_src parent) in _si5351_clkout_reparent() argument
812 if (num > 8) in _si5351_clkout_reparent()
821 if (num == 0 || num == 4) in _si5351_clkout_reparent()
839 si5351_set_bits(drvdata, SI5351_CLK0_CTRL + num, in _si5351_clkout_reparent()
845 struct si5351_driver_data *drvdata, int num, in _si5351_clkout_set_drive_strength() argument
850 if (num > 8) in _si5351_clkout_set_drive_strength()
870 si5351_set_bits(drvdata, SI5351_CLK0_CTRL + num, in _si5351_clkout_set_drive_strength()
876 struct si5351_driver_data *drvdata, int num, in _si5351_clkout_set_disable_state() argument
879 u8 reg = (num < 4) ? SI5351_CLK3_0_DISABLE_STATE : in _si5351_clkout_set_disable_state()
881 u8 shift = (num < 4) ? (2 * num) : (2 * (num-4)); in _si5351_clkout_set_disable_state()
885 if (num > 8) in _si5351_clkout_set_disable_state()
910 static void _si5351_clkout_reset_pll(struct si5351_driver_data *drvdata, int num) in _si5351_clkout_reset_pll() argument
912 u8 val = si5351_reg_read(drvdata, SI5351_CLK0_CTRL + num); in _si5351_clkout_reset_pll()
932 __func__, clk_hw_get_name(&drvdata->clkout[num].hw), in _si5351_clkout_reset_pll()
943 si5351_set_bits(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num, in si5351_clkout_prepare()
950 if (pdata->clkout[hwdata->num].pll_reset) in si5351_clkout_prepare()
951 _si5351_clkout_reset_pll(hwdata->drvdata, hwdata->num); in si5351_clkout_prepare()
954 (1 << hwdata->num), 0); in si5351_clkout_prepare()
963 si5351_set_bits(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num, in si5351_clkout_unprepare()
966 (1 << hwdata->num), (1 << hwdata->num)); in si5351_clkout_unprepare()
976 val = si5351_reg_read(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num); in si5351_clkout_get_parent()
1016 return _si5351_clkout_reparent(hwdata->drvdata, hwdata->num, parent); in si5351_clkout_set_parent()
1027 if (hwdata->num <= 5) in si5351_clkout_recalc_rate()
1028 reg = si5351_msynth_params_address(hwdata->num) + 2; in si5351_clkout_recalc_rate()
1033 if (hwdata->num == 6) { in si5351_clkout_recalc_rate()
1052 if (hwdata->num >= 6 && rate > SI5351_CLKOUT67_MAX_FREQ) in si5351_clkout_determine_rate()
1120 switch (hwdata->num) { in si5351_clkout_set_rate()
1132 si5351_msynth_params_address(hwdata->num) + 2, in si5351_clkout_set_rate()
1138 si5351_set_bits(hwdata->drvdata, SI5351_CLK0_CTRL + hwdata->num, in si5351_clkout_set_rate()
1180 int num = 0; in si5351_dt_parse() local
1203 num = array[i]; in si5351_dt_parse()
1206 if (num >= 2) { in si5351_dt_parse()
1208 "invalid pll %d on pll-source prop\n", num); in si5351_dt_parse()
1214 pdata->pll_src[num] = SI5351_PLL_SRC_XTAL; in si5351_dt_parse()
1220 val, num); in si5351_dt_parse()
1223 pdata->pll_src[num] = SI5351_PLL_SRC_CLKIN; in si5351_dt_parse()
1227 "invalid parent %d for pll %d\n", val, num); in si5351_dt_parse()
1248 num = array[i]; in si5351_dt_parse()
1251 if (num >= 2) { in si5351_dt_parse()
1253 "invalid pll %d on pll-reset-mode prop\n", num); in si5351_dt_parse()
1261 pdata->pll_reset[num] = true; in si5351_dt_parse()
1265 pdata->pll_reset[num] = false; in si5351_dt_parse()
1270 num); in si5351_dt_parse()
1277 if (of_property_read_u32(child, "reg", &num)) { in si5351_dt_parse()
1283 if (num >= 8 || in si5351_dt_parse()
1284 (variant == SI5351_VARIANT_A3 && num >= 3)) { in si5351_dt_parse()
1285 dev_err(&client->dev, "invalid clkout %d\n", num); in si5351_dt_parse()
1293 pdata->clkout[num].multisynth_src = in si5351_dt_parse()
1297 pdata->clkout[num].multisynth_src = in si5351_dt_parse()
1303 val, num); in si5351_dt_parse()
1311 pdata->clkout[num].clkout_src = in si5351_dt_parse()
1315 pdata->clkout[num].clkout_src = in si5351_dt_parse()
1319 pdata->clkout[num].clkout_src = in si5351_dt_parse()
1326 val, num); in si5351_dt_parse()
1329 pdata->clkout[num].clkout_src = in si5351_dt_parse()
1335 val, num); in si5351_dt_parse()
1347 pdata->clkout[num].drive = val; in si5351_dt_parse()
1352 val, num); in si5351_dt_parse()
1361 pdata->clkout[num].disable_state = in si5351_dt_parse()
1365 pdata->clkout[num].disable_state = in si5351_dt_parse()
1369 pdata->clkout[num].disable_state = in si5351_dt_parse()
1373 pdata->clkout[num].disable_state = in si5351_dt_parse()
1379 val, num); in si5351_dt_parse()
1385 pdata->clkout[num].rate = val; in si5351_dt_parse()
1387 pdata->clkout[num].pll_master = in si5351_dt_parse()
1390 pdata->clkout[num].pll_reset = in si5351_dt_parse()
1583 drvdata->pll[0].num = 0; in si5351_i2c_probe()
1599 drvdata->pll[1].num = 1; in si5351_i2c_probe()
1642 drvdata->msynth[n].num = n; in si5351_i2c_probe()
1670 drvdata->clkout[n].num = n; in si5351_i2c_probe()