Lines Matching defs:pcf_bl
47 struct pcf50633_bl *pcf_bl = platform_get_drvdata(pcf->bl_pdev);
49 if (!pcf_bl)
52 pcf_bl->brightness_limit = limit & 0x3f;
53 backlight_update_status(pcf_bl->bl);
60 struct pcf50633_bl *pcf_bl = bl_get_data(bl);
67 else if (bl->props.brightness < pcf_bl->brightness_limit)
70 new_brightness = pcf_bl->brightness_limit;
73 if (pcf_bl->brightness == new_brightness)
77 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDOUT,
79 if (!pcf_bl->brightness)
80 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 1);
82 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 0);
85 pcf_bl->brightness = new_brightness;
92 struct pcf50633_bl *pcf_bl = bl_get_data(bl);
93 return pcf_bl->brightness;
105 struct pcf50633_bl *pcf_bl;
111 pcf_bl = kzalloc(sizeof(*pcf_bl), GFP_KERNEL);
112 if (!pcf_bl)
120 pcf_bl->brightness_limit = pdata->default_brightness_limit;
123 pcf_bl->brightness_limit = 0x3f;
126 pcf_bl->pcf = dev_to_pcf50633(pdev->dev.parent);
128 pcf_bl->bl = backlight_device_register(pdev->name, &pdev->dev, pcf_bl,
131 if (IS_ERR(pcf_bl->bl)) {
132 ret = PTR_ERR(pcf_bl->bl);
136 platform_set_drvdata(pdev, pcf_bl);
138 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
142 pcf_bl->brightness = pcf_bl->bl->props.brightness + 1;
144 backlight_update_status(pcf_bl->bl);
149 kfree(pcf_bl);
156 struct pcf50633_bl *pcf_bl = platform_get_drvdata(pdev);
158 backlight_device_unregister(pcf_bl->bl);
162 kfree(pcf_bl);