linuxkpi: Define backlight_get_brightness()
and backlight_is_blank()
This is not used by the DRM driver yet because we comment out the code calling them, but they are easy to implement. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38530
This commit is contained in:
parent
1a1f7b7df7
commit
a82a8a5e19
@ -91,6 +91,13 @@ backlight_force_update(struct backlight_device *bd, int reason)
|
||||
bd->props.brightness = bd->ops->get_brightness(bd);
|
||||
}
|
||||
|
||||
static inline int
|
||||
backlight_get_brightness(struct backlight_device *bd)
|
||||
{
|
||||
|
||||
return (bd->props.brightness);
|
||||
}
|
||||
|
||||
static inline int
|
||||
backlight_device_set_brightness(struct backlight_device *bd, int brightness)
|
||||
{
|
||||
@ -119,4 +126,11 @@ backlight_disable(struct backlight_device *bd)
|
||||
return (backlight_update_status(bd));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
backlight_is_blank(struct backlight_device *bd)
|
||||
{
|
||||
|
||||
return (bd->props.power != 0/* FB_BLANK_UNBLANK */);
|
||||
}
|
||||
|
||||
#endif /* _LINUXKPI_LINUX_BACKLIGHT_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user