Lines Matching full:tcon
6 * Freescale TCON device driver
23 void fsl_tcon_bypass_disable(struct fsl_tcon *tcon) in fsl_tcon_bypass_disable() argument
25 regmap_update_bits(tcon->regs, FSL_TCON_CTRL1, in fsl_tcon_bypass_disable()
29 void fsl_tcon_bypass_enable(struct fsl_tcon *tcon) in fsl_tcon_bypass_enable() argument
31 regmap_update_bits(tcon->regs, FSL_TCON_CTRL1, in fsl_tcon_bypass_enable()
41 .name = "tcon",
45 struct fsl_tcon *tcon, in fsl_tcon_init_regmap() argument
58 tcon->regs = devm_regmap_init_mmio(dev, regs, in fsl_tcon_init_regmap()
60 return PTR_ERR_OR_ZERO(tcon->regs); in fsl_tcon_init_regmap()
65 struct fsl_tcon *tcon; in fsl_tcon_init() local
69 /* TCON node is not mandatory, some devices do not provide TCON */ in fsl_tcon_init()
70 np = of_parse_phandle(dev->of_node, "fsl,tcon", 0); in fsl_tcon_init()
74 tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL); in fsl_tcon_init()
75 if (!tcon) in fsl_tcon_init()
78 ret = fsl_tcon_init_regmap(dev, tcon, np); in fsl_tcon_init()
80 dev_err(dev, "Couldn't create the TCON regmap\n"); in fsl_tcon_init()
84 tcon->ipg_clk = of_clk_get_by_name(np, "ipg"); in fsl_tcon_init()
85 if (IS_ERR(tcon->ipg_clk)) { in fsl_tcon_init()
86 dev_err(dev, "Couldn't get the TCON bus clock\n"); in fsl_tcon_init()
90 ret = clk_prepare_enable(tcon->ipg_clk); in fsl_tcon_init()
92 dev_err(dev, "Couldn't enable the TCON clock\n"); in fsl_tcon_init()
97 dev_info(dev, "Using TCON in bypass mode\n"); in fsl_tcon_init()
99 return tcon; in fsl_tcon_init()
106 void fsl_tcon_free(struct fsl_tcon *tcon) in fsl_tcon_free() argument
108 clk_disable_unprepare(tcon->ipg_clk); in fsl_tcon_free()
109 clk_put(tcon->ipg_clk); in fsl_tcon_free()