blob: fa559dbe0474d90cb0a05951a1262e9882179703 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/* Public domain. */
#ifndef _LINUX_BACKLIGHT_H
#define _LINUX_BACKLIGHT_H
#include <sys/task.h>
struct backlight_device;
struct backlight_properties {
int type;
int max_brightness;
int brightness;
int power;
};
struct backlight_ops {
int options;
int (*update_status)(struct backlight_device *);
int (*get_brightness)(struct backlight_device *);
};
#define BL_CORE_SUSPENDRESUME 1
struct backlight_device {
const struct backlight_ops *ops;
struct backlight_properties props;
struct task task;
void *data;
};
#define bl_get_data(bd) (bd)->data
#define BACKLIGHT_RAW 0
#define BACKLIGHT_FIRMWARE 1
#define BACKLIGHT_UPDATE_HOTKEY 0
struct backlight_device *backlight_device_register(const char *, void *,
void *, const struct backlight_ops *, struct backlight_properties *);
void backlight_device_unregister(struct backlight_device *);
static inline void
backlight_update_status(struct backlight_device *bd)
{
bd->ops->update_status(bd);
}
static inline void
backlight_force_update(struct backlight_device *bd, int reason)
{
bd->props.brightness = bd->ops->get_brightness(bd);
}
void backlight_schedule_update_status(struct backlight_device *);
#endif
|