Lines Matching refs:cfb

47 	struct clps711x_fb_info *cfb = info->par;  in clps711x_fb_setcolreg()  local
57 if (cfb->cmap_invert) in clps711x_fb_setcolreg()
62 writel((readl(cfb->base + regno) & ~mask) | level, cfb->base + regno); in clps711x_fb_setcolreg()
103 struct clps711x_fb_info *cfb = info->par; in clps711x_fb_set_par() local
108 if (size > cfb->buffsize) in clps711x_fb_set_par()
129 lcdcon |= (cfb->ac_prescale & 0x1f) << 25; in clps711x_fb_set_par()
131 pps = clk_get_rate(cfb->clk) / (PICOS2KHZ(info->var.pixclock) * 1000); in clps711x_fb_set_par()
142 regmap_update_bits(cfb->syscon, SYSCON_OFFSET, SYSCON1_LCDEN, 0); in clps711x_fb_set_par()
143 writel(lcdcon, cfb->base + CLPS711X_LCDCON); in clps711x_fb_set_par()
144 regmap_update_bits(cfb->syscon, SYSCON_OFFSET, in clps711x_fb_set_par()
169 struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); in clps711x_lcd_check_fb() local
171 return (!fi || fi->par == cfb) ? 1 : 0; in clps711x_lcd_check_fb()
176 struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); in clps711x_lcd_get_power() local
178 if (!IS_ERR_OR_NULL(cfb->lcd_pwr)) in clps711x_lcd_get_power()
179 if (!regulator_is_enabled(cfb->lcd_pwr)) in clps711x_lcd_get_power()
187 struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); in clps711x_lcd_set_power() local
189 if (!IS_ERR_OR_NULL(cfb->lcd_pwr)) { in clps711x_lcd_set_power()
191 if (!regulator_is_enabled(cfb->lcd_pwr)) in clps711x_lcd_set_power()
192 return regulator_enable(cfb->lcd_pwr); in clps711x_lcd_set_power()
194 if (regulator_is_enabled(cfb->lcd_pwr)) in clps711x_lcd_set_power()
195 return regulator_disable(cfb->lcd_pwr); in clps711x_lcd_set_power()
212 struct clps711x_fb_info *cfb; in clps711x_fb_probe() local
222 info = framebuffer_alloc(sizeof(*cfb), dev); in clps711x_fb_probe()
226 cfb = info->par; in clps711x_fb_probe()
232 cfb->base = devm_ioremap(dev, res->start, resource_size(res)); in clps711x_fb_probe()
233 if (!cfb->base) { in clps711x_fb_probe()
260 cfb->buffsize = resource_size(res); in clps711x_fb_probe()
263 info->apertures->ranges[0].size = cfb->buffsize; in clps711x_fb_probe()
265 cfb->clk = devm_clk_get(dev, NULL); in clps711x_fb_probe()
266 if (IS_ERR(cfb->clk)) { in clps711x_fb_probe()
267 ret = PTR_ERR(cfb->clk); in clps711x_fb_probe()
271 cfb->syscon = in clps711x_fb_probe()
273 if (IS_ERR(cfb->syscon)) { in clps711x_fb_probe()
274 ret = PTR_ERR(cfb->syscon); in clps711x_fb_probe()
285 ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE); in clps711x_fb_probe()
291 of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale); in clps711x_fb_probe()
292 cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert"); in clps711x_fb_probe()
301 if (info->fix.smem_start != (readb(cfb->base + CLPS711X_FBADDR) << 28)) in clps711x_fb_probe()
302 regmap_update_bits(cfb->syscon, SYSCON_OFFSET, in clps711x_fb_probe()
305 ret = regmap_read(cfb->syscon, SYSCON_OFFSET, &val); in clps711x_fb_probe()
311 writeb(info->fix.smem_start >> 28, cfb->base + CLPS711X_FBADDR); in clps711x_fb_probe()
313 memset_io(info->screen_base, 0, cfb->buffsize); in clps711x_fb_probe()
316 cfb->lcd_pwr = devm_regulator_get(dev, "lcd"); in clps711x_fb_probe()
317 if (PTR_ERR(cfb->lcd_pwr) == -EPROBE_DEFER) { in clps711x_fb_probe()
331 fb_videomode_to_var(&info->var, &cfb->mode); in clps711x_fb_probe()
345 lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb, in clps711x_fb_probe()
354 regmap_update_bits(cfb->syscon, SYSCON_OFFSET, SYSCON1_LCDEN, 0); in clps711x_fb_probe()
366 struct clps711x_fb_info *cfb = info->par; in clps711x_fb_remove() local
368 regmap_update_bits(cfb->syscon, SYSCON_OFFSET, SYSCON1_LCDEN, 0); in clps711x_fb_remove()