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