Rev 6336 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6336 | Rev 6936 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Backlight Lowlevel Control Abstraction |
2 | * Backlight Lowlevel Control Abstraction |
3 | * |
3 | * |
4 | * Copyright (C) 2003,2004 Hewlett-Packard Company |
4 | * Copyright (C) 2003,2004 Hewlett-Packard Company |
5 | * |
5 | * |
6 | */ |
6 | */ |
7 | 7 | ||
8 | #ifndef _LINUX_BACKLIGHT_H |
8 | #ifndef _LINUX_BACKLIGHT_H |
9 | #define _LINUX_BACKLIGHT_H |
9 | #define _LINUX_BACKLIGHT_H |
10 | 10 | ||
11 | #include |
11 | #include |
12 | #include |
12 | #include |
13 | #include |
13 | #include |
- | 14 | #include |
|
- | 15 | ||
14 | /* Notes on locking: |
16 | /* Notes on locking: |
15 | * |
17 | * |
16 | * backlight_device->ops_lock is an internal backlight lock protecting the |
18 | * backlight_device->ops_lock is an internal backlight lock protecting the |
17 | * ops pointer and no code outside the core should need to touch it. |
19 | * ops pointer and no code outside the core should need to touch it. |
18 | * |
20 | * |
19 | * Access to update_status() is serialised by the update_lock mutex since |
21 | * Access to update_status() is serialised by the update_lock mutex since |
20 | * most drivers seem to need this and historically get it wrong. |
22 | * most drivers seem to need this and historically get it wrong. |
21 | * |
23 | * |
22 | * Most drivers don't need locking on their get_brightness() method. |
24 | * Most drivers don't need locking on their get_brightness() method. |
23 | * If yours does, you need to implement it in the driver. You can use the |
25 | * If yours does, you need to implement it in the driver. You can use the |
24 | * update_lock mutex if appropriate. |
26 | * update_lock mutex if appropriate. |
25 | * |
27 | * |
26 | * Any other use of the locks below is probably wrong. |
28 | * Any other use of the locks below is probably wrong. |
27 | */ |
29 | */ |
28 | 30 | ||
29 | enum backlight_update_reason { |
31 | enum backlight_update_reason { |
30 | BACKLIGHT_UPDATE_HOTKEY, |
32 | BACKLIGHT_UPDATE_HOTKEY, |
31 | BACKLIGHT_UPDATE_SYSFS, |
33 | BACKLIGHT_UPDATE_SYSFS, |
32 | }; |
34 | }; |
33 | 35 | ||
34 | enum backlight_type { |
36 | enum backlight_type { |
35 | BACKLIGHT_RAW = 1, |
37 | BACKLIGHT_RAW = 1, |
36 | BACKLIGHT_PLATFORM, |
38 | BACKLIGHT_PLATFORM, |
37 | BACKLIGHT_FIRMWARE, |
39 | BACKLIGHT_FIRMWARE, |
38 | BACKLIGHT_TYPE_MAX, |
40 | BACKLIGHT_TYPE_MAX, |
39 | }; |
41 | }; |
40 | 42 | ||
41 | enum backlight_notification { |
43 | enum backlight_notification { |
42 | BACKLIGHT_REGISTERED, |
44 | BACKLIGHT_REGISTERED, |
43 | BACKLIGHT_UNREGISTERED, |
45 | BACKLIGHT_UNREGISTERED, |
44 | }; |
46 | }; |
- | 47 | ||
- | 48 | struct backlight_device; |
|
45 | 49 | struct fb_info; |
|
46 | #endif |
50 | #endif |