Lines Matching refs:bd

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