1.\" Copyright (c) 2020 Emmanuel Vadot <manu@freebsd.org> 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" notice, this list of conditions and the following disclaimer in the 10.\" documentation and/or other materials provided with the distribution. 11.\" 12.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 13.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 15.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 16.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 17.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22.\" 23.Dd October 2, 2020 24.Dt BACKLIGHT 9 25.Os 26.Sh NAME 27.Nm backlight , 28.Nm backlight_register , 29.Nm backlight_destroy , 30.Nm BACKLIGHT_GET_STATUS , 31.Nm BACKLIGHT_SET_STATUS 32.Nd BACKLIGHT methods 33.Sh SYNOPSIS 34.Cd "device backlight" 35.In "backlight_if.h" 36.In "sys/sys/backlight.h" 37.Ft int 38.Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props" 39.Ft int 40.Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props" 41.Ft struct cdev * 42.Fn backlight_register "const char *name" "device_t dev" 43.Ft int 44.Fn backlight_destroy "struct cdev *cdev" 45.Sh DESCRIPTION 46The backlight driver provides a generic way for handling a panel backlight. 47.Pp 48Drivers for backlight system register themselves globally using the 49.Fn backlight_register 50function. 51They must define two methods, 52.Fn BACKLIGHT_GET_STATUS 53which is used to query the current brightness level and 54.Fn BACKLIGHT_SET_STATUS 55which is used to update it. 56.Sh INTERFACE 57.Bl -tag -width indent 58.It Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props" 59Driver fills the current brightless level and the optional supported levels. 60.It Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props" 61Driver update the backlight level based on the brightness member of the props 62struct. 63.El 64.Sh FILES 65.Bl -tag -width "/dev/backlight/*" 66.It Pa /dev/backlight/* 67.El 68.Sh HISTORY 69The 70.Nm backlight 71interface first appear in 72.Fx 13.0 . 73The 74.Nm backlight 75driver and manual page was written by 76.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . 77