Lines Matching defs: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 = backlight_get_brightness(bd);
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);
93 static int aat2870_bl_check_fb(struct backlight_device *bd, struct fb_info *fi)
108 struct backlight_device *bd;
135 bd = devm_backlight_device_register(&pdev->dev, "aat2870-backlight",
138 if (IS_ERR(bd)) {
141 ret = PTR_ERR(bd);
148 aat2870_bl->bd = bd;
161 bd->props.max_brightness = pdata->max_brightness;
163 bd->props.max_brightness = 255;
166 bd->props.power = FB_BLANK_UNBLANK;
167 bd->props.brightness = bd->props.max_brightness;
169 ret = aat2870_bl_update_status(bd);
184 struct backlight_device *bd = aat2870_bl->bd;
186 bd->props.power = FB_BLANK_POWERDOWN;
187 bd->props.brightness = 0;
188 backlight_update_status(bd);