.\" Copyright (c) 2020 Emmanuel Vadot .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd October 2, 2020 .Dt BACKLIGHT 9 .Os .Sh NAME .Nm backlight , .Nm backlight_register , .Nm backlight_destroy , .Nm BACKLIGHT_GET_STATUS , .Nm BACKLIGHT_SET_STATUS .Nd BACKLIGHT methods .Sh SYNOPSIS .Cd "device backlight" .In "backlight_if.h" .In "sys/sys/backlight.h" .Ft int .Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props" .Ft int .Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props" .Ft struct cdev * .Fn backlight_register "const char *name" "device_t dev" .Ft int .Fn backlight_destroy "struct cdev *cdev" .Sh DESCRIPTION The backlight driver provides a generic way for handling a panel backlight. .Pp Drivers for backlight system register themselves globally using the .Fn backlight_register function. They must define two methods, .Fn BACKLIGHT_GET_STATUS which is used to query the current brightness level and .Fn BACKLIGHT_SET_STATUS which is used to update it. .Sh INTERFACE .Bl -tag -width indent .It Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props" Driver fills the current brightless level and the optional supported levels. .It Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props" Driver update the backlight level based on the brightness member of the props struct. .El .Sh FILES .Bl -tag -width "/dev/backlight/*" .It Pa /dev/backlight/* .El .Sh HISTORY The .Nm backlight interface first appear in .Fx 13.0 . The .Nm backlight driver and manual page was written by .An Emmanuel Vadot Aq Mt manu@FreeBSD.org .