Lines Matching refs:bd
174 int (*check_fb)(struct backlight_device *bd, struct fb_info *info);
347 static inline int backlight_update_status(struct backlight_device *bd) in backlight_update_status() argument
351 mutex_lock(&bd->update_lock); in backlight_update_status()
352 if (bd->ops && bd->ops->update_status) in backlight_update_status()
353 ret = bd->ops->update_status(bd); in backlight_update_status()
354 mutex_unlock(&bd->update_lock); in backlight_update_status()
363 static inline int backlight_enable(struct backlight_device *bd) in backlight_enable() argument
365 if (!bd) in backlight_enable()
368 bd->props.power = FB_BLANK_UNBLANK; in backlight_enable()
369 bd->props.fb_blank = FB_BLANK_UNBLANK; in backlight_enable()
370 bd->props.state &= ~BL_CORE_FBBLANK; in backlight_enable()
372 return backlight_update_status(bd); in backlight_enable()
379 static inline int backlight_disable(struct backlight_device *bd) in backlight_disable() argument
381 if (!bd) in backlight_disable()
384 bd->props.power = FB_BLANK_POWERDOWN; in backlight_disable()
385 bd->props.fb_blank = FB_BLANK_POWERDOWN; in backlight_disable()
386 bd->props.state |= BL_CORE_FBBLANK; in backlight_disable()
388 return backlight_update_status(bd); in backlight_disable()
403 static inline bool backlight_is_blank(const struct backlight_device *bd) in backlight_is_blank() argument
405 return bd->props.power != FB_BLANK_UNBLANK || in backlight_is_blank()
406 bd->props.fb_blank != FB_BLANK_UNBLANK || in backlight_is_blank()
407 bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK); in backlight_is_blank()
421 static inline int backlight_get_brightness(const struct backlight_device *bd) in backlight_get_brightness() argument
423 if (backlight_is_blank(bd)) in backlight_get_brightness()
426 return bd->props.brightness; in backlight_get_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,