Lines Matching refs:bd
21 struct backlight_device *bd;
31 struct backlight_device *bd = aat2870_bl->bd;
35 val /= bd->props.max_brightness;
57 static int aat2870_bl_update_status(struct backlight_device *bd)
59 struct aat2870_bl_driver_data *aat2870_bl = bl_get_data(bd);
62 int brightness = bd->props.brightness;
65 if ((brightness < 0) || (bd->props.max_brightness < brightness)) {
66 dev_err(&bd->dev, "invalid brightness, %d\n", brightness);
70 dev_dbg(&bd->dev, "brightness=%d, power=%d, state=%d\n",
71 bd->props.brightness, bd->props.power, bd->props.state);
73 if ((bd->props.power != FB_BLANK_UNBLANK) ||
74 (bd->props.state & BL_CORE_FBBLANK) ||
75 (bd->props.state & BL_CORE_SUSPENDED))
98 static int aat2870_bl_check_fb(struct backlight_device *bd, struct fb_info *fi)
113 struct backlight_device *bd;
140 bd = devm_backlight_device_register(&pdev->dev, "aat2870-backlight",
143 if (IS_ERR(bd)) {
146 ret = PTR_ERR(bd);
153 aat2870_bl->bd = bd;
166 bd->props.max_brightness = pdata->max_brightness;
168 bd->props.max_brightness = 255;
171 bd->props.power = FB_BLANK_UNBLANK;
172 bd->props.brightness = bd->props.max_brightness;
174 ret = aat2870_bl_update_status(bd);
189 struct backlight_device *bd = aat2870_bl->bd;
191 bd->props.power = FB_BLANK_POWERDOWN;
192 bd->props.brightness = 0;
193 backlight_update_status(bd);