Lines Matching defs:pcf_bl
38 struct pcf50633_bl *pcf_bl = platform_get_drvdata(pcf->bl_pdev);
40 if (!pcf_bl)
43 pcf_bl->brightness_limit = limit & 0x3f;
44 backlight_update_status(pcf_bl->bl);
51 struct pcf50633_bl *pcf_bl = bl_get_data(bl);
58 else if (bl->props.brightness < pcf_bl->brightness_limit)
61 new_brightness = pcf_bl->brightness_limit;
64 if (pcf_bl->brightness == new_brightness)
68 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDOUT,
70 if (!pcf_bl->brightness)
71 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 1);
73 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDENA, 0);
76 pcf_bl->brightness = new_brightness;
83 struct pcf50633_bl *pcf_bl = bl_get_data(bl);
85 return pcf_bl->brightness;
96 struct pcf50633_bl *pcf_bl;
102 pcf_bl = devm_kzalloc(&pdev->dev, sizeof(*pcf_bl), GFP_KERNEL);
103 if (!pcf_bl)
113 pcf_bl->brightness_limit = pdata->default_brightness_limit;
116 pcf_bl->brightness_limit = 0x3f;
119 pcf_bl->pcf = dev_to_pcf50633(pdev->dev.parent);
121 pcf_bl->bl = devm_backlight_device_register(&pdev->dev, pdev->name,
122 &pdev->dev, pcf_bl,
125 if (IS_ERR(pcf_bl->bl))
126 return PTR_ERR(pcf_bl->bl);
128 platform_set_drvdata(pdev, pcf_bl);
130 pcf50633_reg_write(pcf_bl->pcf, PCF50633_REG_LEDDIM, pdata->ramp_time);
136 pcf_bl->brightness = pcf_bl->bl->props.brightness + 1;
138 backlight_update_status(pcf_bl->bl);