Lines Matching refs:bd

174 	int (*check_fb)(struct backlight_device *bd, struct fb_info *info);
345 * @bd: the backlight device
347 static inline int backlight_update_status(struct backlight_device *bd)
351 mutex_lock(&bd->update_lock);
352 if (bd->ops && bd->ops->update_status)
353 ret = bd->ops->update_status(bd);
354 mutex_unlock(&bd->update_lock);
361 * @bd: the backlight device to enable
363 static inline int backlight_enable(struct backlight_device *bd)
365 if (!bd)
368 bd->props.power = FB_BLANK_UNBLANK;
369 bd->props.fb_blank = FB_BLANK_UNBLANK;
370 bd->props.state &= ~BL_CORE_FBBLANK;
372 return backlight_update_status(bd);
377 * @bd: the backlight device to disable
379 static inline int backlight_disable(struct backlight_device *bd)
381 if (!bd)
384 bd->props.power = FB_BLANK_POWERDOWN;
385 bd->props.fb_blank = FB_BLANK_POWERDOWN;
386 bd->props.state |= BL_CORE_FBBLANK;
388 return backlight_update_status(bd);
393 * @bd: the backlight device
403 static inline bool backlight_is_blank(const struct backlight_device *bd)
405 return bd->props.power != FB_BLANK_UNBLANK ||
406 bd->props.fb_blank != FB_BLANK_UNBLANK ||
407 bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK);
412 * @bd: the backlight device
421 static inline int backlight_get_brightness(const struct backlight_device *bd)
423 if (backlight_is_blank(bd))
426 return bd->props.brightness;
438 void backlight_device_unregister(struct backlight_device *bd);
440 struct backlight_device *bd);
441 void backlight_force_update(struct backlight_device *bd,
447 int backlight_device_set_brightness(struct backlight_device *bd,