Lines Matching full:tcon
7 * Freescale TCON device driver
19 void fsl_tcon_bypass_disable(struct fsl_tcon *tcon) in fsl_tcon_bypass_disable() argument
21 regmap_update_bits(tcon->regs, FSL_TCON_CTRL1, in fsl_tcon_bypass_disable()
25 void fsl_tcon_bypass_enable(struct fsl_tcon *tcon) in fsl_tcon_bypass_enable() argument
27 regmap_update_bits(tcon->regs, FSL_TCON_CTRL1, in fsl_tcon_bypass_enable()
37 .name = "tcon",
41 struct fsl_tcon *tcon, in fsl_tcon_init_regmap() argument
54 tcon->regs = devm_regmap_init_mmio(dev, regs, in fsl_tcon_init_regmap()
56 return PTR_ERR_OR_ZERO(tcon->regs); in fsl_tcon_init_regmap()
61 struct fsl_tcon *tcon; in fsl_tcon_init() local
65 /* TCON node is not mandatory, some devices do not provide TCON */ in fsl_tcon_init()
66 np = of_parse_phandle(dev->of_node, "fsl,tcon", 0); in fsl_tcon_init()
70 tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL); in fsl_tcon_init()
71 if (!tcon) in fsl_tcon_init()
74 ret = fsl_tcon_init_regmap(dev, tcon, np); in fsl_tcon_init()
76 dev_err(dev, "Couldn't create the TCON regmap\n"); in fsl_tcon_init()
80 tcon->ipg_clk = of_clk_get_by_name(np, "ipg"); in fsl_tcon_init()
81 if (IS_ERR(tcon->ipg_clk)) { in fsl_tcon_init()
82 dev_err(dev, "Couldn't get the TCON bus clock\n"); in fsl_tcon_init()
86 ret = clk_prepare_enable(tcon->ipg_clk); in fsl_tcon_init()
88 dev_err(dev, "Couldn't enable the TCON clock\n"); in fsl_tcon_init()
93 dev_info(dev, "Using TCON in bypass mode\n"); in fsl_tcon_init()
95 return tcon; in fsl_tcon_init()
102 void fsl_tcon_free(struct fsl_tcon *tcon) in fsl_tcon_free() argument
104 clk_disable_unprepare(tcon->ipg_clk); in fsl_tcon_free()
105 clk_put(tcon->ipg_clk); in fsl_tcon_free()