mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
linuxkpi: Add backlight_device_set_brightness
This simply set the brightness of a backlight device. Needed by drm-kmod v5.8 Reviewed by: bz, emaste MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D34285
This commit is contained in:
parent
4f689b302f
commit
2cc3af6e1d
1 changed files with 10 additions and 0 deletions
|
|
@ -91,6 +91,16 @@ backlight_force_update(struct backlight_device *bd, int reason)
|
|||
bd->props.brightness = bd->ops->get_brightness(bd);
|
||||
}
|
||||
|
||||
static inline int
|
||||
backlight_device_set_brightness(struct backlight_device *bd, int brightness)
|
||||
{
|
||||
|
||||
if (brightness > bd->props.max_brightness)
|
||||
return (EINVAL);
|
||||
bd->props.brightness = brightness;
|
||||
return (bd->ops->update_status(bd));
|
||||
}
|
||||
|
||||
static inline int
|
||||
backlight_enable(struct backlight_device *bd)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue