Lines Matching full:clkout
188 * @num_channels: Number of available output channels (clkout count)
247 * Each pair of clkout clocks share a single device clock (DCLKX_Y)
248 * @clkout: list of output clock references
249 * @clk_data: holds clkout related data like clk_hw* and number of clocks
268 struct lmk_clkout *clkout; member
703 dev_dbg(lmk->dev, "clkout%02u: sysref_ddly=%u, dclkx_y_ddly=%u, " in lmk04832_clkout_set_ddly()
1167 struct lmk_clkout *clkout = container_of(hw, struct lmk_clkout, hw); in lmk04832_clkout_is_enabled() local
1168 struct lmk04832 *lmk = clkout->lmk; in lmk04832_clkout_is_enabled()
1176 ret = regmap_read(lmk->regmap, LMK04832_REG_CLKOUT_CTRL2(clkout->id), in lmk04832_clkout_is_enabled()
1183 ret = regmap_read(lmk->regmap, LMK04832_REG_CLKOUT_SRC_MUX(clkout->id), in lmk04832_clkout_is_enabled()
1190 LMK04832_REG_CLKOUT_CTRL4(clkout->id), in lmk04832_clkout_is_enabled()
1198 ret = regmap_read(lmk->regmap, LMK04832_REG_CLKOUT_FMT(clkout->id), in lmk04832_clkout_is_enabled()
1203 if (clkout->id % 2) in lmk04832_clkout_is_enabled()
1213 struct lmk_clkout *clkout = container_of(hw, struct lmk_clkout, hw); in lmk04832_clkout_prepare() local
1214 struct lmk04832 *lmk = clkout->lmk; in lmk04832_clkout_prepare()
1218 if (clkout->format == LMK04832_VAL_CLKOUT_FMT_POWERDOWN) in lmk04832_clkout_prepare()
1223 LMK04832_REG_CLKOUT_CTRL2(clkout->id), in lmk04832_clkout_prepare()
1228 ret = regmap_read(lmk->regmap, LMK04832_REG_CLKOUT_SRC_MUX(clkout->id), in lmk04832_clkout_prepare()
1235 LMK04832_REG_CLKOUT_CTRL4(clkout->id), in lmk04832_clkout_prepare()
1242 LMK04832_REG_CLKOUT_FMT(clkout->id), in lmk04832_clkout_prepare()
1243 LMK04832_BIT_CLKOUT_FMT(clkout->id), in lmk04832_clkout_prepare()
1244 clkout->format << 4 * (clkout->id % 2)); in lmk04832_clkout_prepare()
1249 struct lmk_clkout *clkout = container_of(hw, struct lmk_clkout, hw); in lmk04832_clkout_unprepare() local
1250 struct lmk04832 *lmk = clkout->lmk; in lmk04832_clkout_unprepare()
1252 regmap_update_bits(lmk->regmap, LMK04832_REG_CLKOUT_FMT(clkout->id), in lmk04832_clkout_unprepare()
1253 LMK04832_BIT_CLKOUT_FMT(clkout->id), in lmk04832_clkout_unprepare()
1259 struct lmk_clkout *clkout = container_of(hw, struct lmk_clkout, hw); in lmk04832_clkout_set_parent() local
1260 struct lmk04832 *lmk = clkout->lmk; in lmk04832_clkout_set_parent()
1263 LMK04832_REG_CLKOUT_SRC_MUX(clkout->id), in lmk04832_clkout_set_parent()
1271 struct lmk_clkout *clkout = container_of(hw, struct lmk_clkout, hw); in lmk04832_clkout_get_parent() local
1272 struct lmk04832 *lmk = clkout->lmk; in lmk04832_clkout_get_parent()
1276 ret = regmap_read(lmk->regmap, LMK04832_REG_CLKOUT_SRC_MUX(clkout->id), in lmk04832_clkout_get_parent()
1325 sprintf(name, "lmk-clkout%02d", num); in lmk04832_register_clkout()
1336 lmk->clkout[num].id = num; in lmk04832_register_clkout()
1337 lmk->clkout[num].lmk = lmk; in lmk04832_register_clkout()
1338 lmk->clkout[num].hw.init = &init; in lmk04832_register_clkout()
1339 lmk->clk_data->hws[num] = &lmk->clkout[num].hw; in lmk04832_register_clkout()
1346 lmk->clkout[num].sysref)); in lmk04832_register_clkout()
1348 return devm_clk_hw_register(lmk->dev, &lmk->clkout[num].hw); in lmk04832_register_clkout()
1424 lmk->clkout = devm_kcalloc(lmk->dev, info->num_channels, in lmk04832_probe()
1425 sizeof(*lmk->clkout), GFP_KERNEL); in lmk04832_probe()
1426 if (!lmk->clkout) { in lmk04832_probe()
1467 of_property_read_u32(child, "ti,clkout-fmt", in lmk04832_probe()
1468 &lmk->clkout[reg].format); in lmk04832_probe()
1470 if (lmk->clkout[reg].format >= 0x0a && reg % 2 == 0 in lmk04832_probe()
1472 dev_err(lmk->dev, "invalid format for clkout%02d\n", in lmk04832_probe()
1475 lmk->clkout[reg].sysref = in lmk04832_probe()
1476 of_property_read_bool(child, "ti,clkout-sysref"); in lmk04832_probe()