1 .\" Copyright (c) 2020 Emmanuel Vadot <manu@freebsd.org>
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
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.
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.
30 .Nm backlight_register ,
31 .Nm backlight_destroy ,
32 .Nm BACKLIGHT_GET_STATUS ,
33 .Nm BACKLIGHT_SET_STATUS ,
36 .Cd "device backlight"
38 .In "sys/sys/backlight.h"
40 .Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props"
42 .Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props"
44 .Fn backlight_register "const char *name" "device_t dev"
46 .Fn backlight_destroy "struct cdev *cdev"
48 The backlight driver provides a generic way for handling a panel backlight.
50 Drivers for backlight system register themselves globally using the
51 .Fn backlight_register
53 They must define two methods,
54 .Fn BACKLIGHT_GET_STATUS
55 which is used to query the current brightness level and
56 .Fn BACKLIGHT_SET_STATUS
57 which is used to update it.
59 .Bl -tag -width indent
60 .It Fn BACKLIGHT_GET_STATUS "device_t bus" "struct backlight_props *props"
61 Driver fills the current brightless level and the optional supported levels.
62 .It Fn BACKLIGHT_SET_STATUS "device_t bus" "struct backlight_props *props"
63 Driver update the backlight level based on the brightness member of the props
67 .Bl -tag -width "/dev/backlight/*"
68 .It Pa /dev/backlight/*
72 interface first appear in
76 driver and manual page was written by
77 .An Emmanuel Vadot Aq Mt manu@FreeBSD.org .