Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
40b20c25
Commit
40b20c25
authored
Dec 20, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull platform-drivers into test branch
parents
cece9014
a8274d57
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
53 additions
and
22 deletions
+53
-22
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+1
-1
drivers/acpi/ibm_acpi.c
drivers/acpi/ibm_acpi.c
+2
-3
drivers/acpi/toshiba_acpi.c
drivers/acpi/toshiba_acpi.c
+2
-1
drivers/acpi/video.c
drivers/acpi/video.c
+34
-7
drivers/misc/msi-laptop.c
drivers/misc/msi-laptop.c
+2
-1
drivers/usb/misc/appledisplay.c
drivers/usb/misc/appledisplay.c
+1
-1
drivers/video/aty/aty128fb.c
drivers/video/aty/aty128fb.c
+1
-1
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+1
-1
drivers/video/aty/radeon_backlight.c
drivers/video/aty/radeon_backlight.c
+1
-1
drivers/video/backlight/backlight.c
drivers/video/backlight/backlight.c
+5
-2
drivers/video/nvidia/nv_backlight.c
drivers/video/nvidia/nv_backlight.c
+1
-1
drivers/video/riva/fbdev.c
drivers/video/riva/fbdev.c
+1
-1
include/linux/backlight.h
include/linux/backlight.h
+1
-1
No files found.
drivers/acpi/asus_acpi.c
View file @
40b20c25
...
@@ -1401,7 +1401,7 @@ static int __init asus_acpi_init(void)
...
@@ -1401,7 +1401,7 @@ static int __init asus_acpi_init(void)
return
result
;
return
result
;
}
}
asus_backlight_device
=
backlight_device_register
(
"asus"
,
NULL
,
asus_backlight_device
=
backlight_device_register
(
"asus"
,
NULL
,
NULL
,
&
asus_backlight_data
);
&
asus_backlight_data
);
if
(
IS_ERR
(
asus_backlight_device
))
{
if
(
IS_ERR
(
asus_backlight_device
))
{
printk
(
KERN_ERR
"Could not register asus backlight device
\n
"
);
printk
(
KERN_ERR
"Could not register asus backlight device
\n
"
);
...
...
drivers/acpi/ibm_acpi.c
View file @
40b20c25
...
@@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = {
...
@@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = {
static
int
brightness_init
(
void
)
static
int
brightness_init
(
void
)
{
{
ibm_backlight_device
=
backlight_device_register
(
"ibm"
,
NULL
,
ibm_backlight_device
=
backlight_device_register
(
"ibm"
,
NULL
,
NULL
,
&
ibm_backlight_data
);
&
ibm_backlight_data
);
if
(
IS_ERR
(
ibm_backlight_device
))
{
if
(
IS_ERR
(
ibm_backlight_device
))
{
printk
(
IBM_ERR
"Could not register backlight device
\n
"
);
printk
(
IBM_ERR
"Could not register backlight device
\n
"
);
...
@@ -2503,7 +2503,7 @@ static int __init setup_notify(struct ibm_struct *ibm)
...
@@ -2503,7 +2503,7 @@ static int __init setup_notify(struct ibm_struct *ibm)
ibm
->
name
,
status
);
ibm
->
name
,
status
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
ibm
->
notify_installed
=
1
;
return
0
;
return
0
;
}
}
...
@@ -2580,7 +2580,6 @@ static int __init ibm_init(struct ibm_struct *ibm)
...
@@ -2580,7 +2580,6 @@ static int __init ibm_init(struct ibm_struct *ibm)
ret
=
setup_notify
(
ibm
);
ret
=
setup_notify
(
ibm
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
ibm
->
notify_installed
=
1
;
}
}
return
0
;
return
0
;
...
...
drivers/acpi/toshiba_acpi.c
View file @
40b20c25
...
@@ -590,7 +590,8 @@ static int __init toshiba_acpi_init(void)
...
@@ -590,7 +590,8 @@ static int __init toshiba_acpi_init(void)
remove_proc_entry
(
PROC_TOSHIBA
,
acpi_root_dir
);
remove_proc_entry
(
PROC_TOSHIBA
,
acpi_root_dir
);
}
}
toshiba_backlight_device
=
backlight_device_register
(
"toshiba"
,
NULL
,
toshiba_backlight_device
=
backlight_device_register
(
"toshiba"
,
NULL
,
NULL
,
&
toshiba_backlight_data
);
&
toshiba_backlight_data
);
if
(
IS_ERR
(
toshiba_backlight_device
))
{
if
(
IS_ERR
(
toshiba_backlight_device
))
{
printk
(
KERN_ERR
"Could not register toshiba backlight device
\n
"
);
printk
(
KERN_ERR
"Could not register toshiba backlight device
\n
"
);
...
...
drivers/acpi/video.c
View file @
40b20c25
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
*
*
* Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
* Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
* Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org>
* Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org>
* Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net>
*
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
*
...
@@ -47,11 +48,11 @@
...
@@ -47,11 +48,11 @@
#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x8
2
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x8
5
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x8
3
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x8
6
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x8
4
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x8
7
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x8
5
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x8
8
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x8
6
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x8
9
#define ACPI_VIDEO_HEAD_INVALID (~0u - 1)
#define ACPI_VIDEO_HEAD_INVALID (~0u - 1)
#define ACPI_VIDEO_HEAD_END (~0u)
#define ACPI_VIDEO_HEAD_END (~0u)
...
@@ -1505,8 +1506,34 @@ static int
...
@@ -1505,8 +1506,34 @@ static int
acpi_video_get_next_level
(
struct
acpi_video_device
*
device
,
acpi_video_get_next_level
(
struct
acpi_video_device
*
device
,
u32
level_current
,
u32
event
)
u32
level_current
,
u32
event
)
{
{
/*Fix me */
int
min
,
max
,
min_above
,
max_below
,
i
,
l
;
return
level_current
;
max
=
max_below
=
0
;
min
=
min_above
=
255
;
for
(
i
=
0
;
i
<
device
->
brightness
->
count
;
i
++
)
{
l
=
device
->
brightness
->
levels
[
i
];
if
(
l
<
min
)
min
=
l
;
if
(
l
>
max
)
max
=
l
;
if
(
l
<
min_above
&&
l
>
level_current
)
min_above
=
l
;
if
(
l
>
max_below
&&
l
<
level_current
)
max_below
=
l
;
}
switch
(
event
)
{
case
ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS
:
return
(
level_current
<
max
)
?
min_above
:
min
;
case
ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS
:
return
(
level_current
<
max
)
?
min_above
:
max
;
case
ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS
:
return
(
level_current
>
min
)
?
max_below
:
min
;
case
ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS
:
case
ACPI_VIDEO_NOTIFY_DISPLAY_OFF
:
return
0
;
default:
return
level_current
;
}
}
}
static
void
static
void
...
...
drivers/misc/msi-laptop.c
View file @
40b20c25
...
@@ -317,7 +317,8 @@ static int __init msi_init(void)
...
@@ -317,7 +317,8 @@ static int __init msi_init(void)
/* Register backlight stuff */
/* Register backlight stuff */
msibl_device
=
backlight_device_register
(
"msi-laptop-bl"
,
NULL
,
&
msibl_props
);
msibl_device
=
backlight_device_register
(
"msi-laptop-bl"
,
NULL
,
NULL
,
&
msibl_props
);
if
(
IS_ERR
(
msibl_device
))
if
(
IS_ERR
(
msibl_device
))
return
PTR_ERR
(
msibl_device
);
return
PTR_ERR
(
msibl_device
);
...
...
drivers/usb/misc/appledisplay.c
View file @
40b20c25
...
@@ -281,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface,
...
@@ -281,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface,
/* Register backlight device */
/* Register backlight device */
snprintf
(
bl_name
,
sizeof
(
bl_name
),
"appledisplay%d"
,
snprintf
(
bl_name
,
sizeof
(
bl_name
),
"appledisplay%d"
,
atomic_inc_return
(
&
count_displays
)
-
1
);
atomic_inc_return
(
&
count_displays
)
-
1
);
pdata
->
bd
=
backlight_device_register
(
bl_name
,
pdata
,
pdata
->
bd
=
backlight_device_register
(
bl_name
,
NULL
,
NULL
,
&
appledisplay_bl_data
);
&
appledisplay_bl_data
);
if
(
IS_ERR
(
pdata
->
bd
))
{
if
(
IS_ERR
(
pdata
->
bd
))
{
err
(
"appledisplay: Backlight registration failed"
);
err
(
"appledisplay: Backlight registration failed"
);
...
...
drivers/video/aty/aty128fb.c
View file @
40b20c25
...
@@ -1834,7 +1834,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
...
@@ -1834,7 +1834,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
snprintf
(
name
,
sizeof
(
name
),
"aty128bl%d"
,
info
->
node
);
snprintf
(
name
,
sizeof
(
name
),
"aty128bl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
aty128_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
aty128_bl_data
);
if
(
IS_ERR
(
bd
))
{
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"aty128: Backlight registration failed
\n
"
);
printk
(
KERN_WARNING
"aty128: Backlight registration failed
\n
"
);
...
...
drivers/video/aty/atyfb_base.c
View file @
40b20c25
...
@@ -2211,7 +2211,7 @@ static void aty_bl_init(struct atyfb_par *par)
...
@@ -2211,7 +2211,7 @@ static void aty_bl_init(struct atyfb_par *par)
snprintf
(
name
,
sizeof
(
name
),
"atybl%d"
,
info
->
node
);
snprintf
(
name
,
sizeof
(
name
),
"atybl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
aty_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
aty_bl_data
);
if
(
IS_ERR
(
bd
))
{
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"aty: Backlight registration failed
\n
"
);
printk
(
KERN_WARNING
"aty: Backlight registration failed
\n
"
);
...
...
drivers/video/aty/radeon_backlight.c
View file @
40b20c25
...
@@ -163,7 +163,7 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
...
@@ -163,7 +163,7 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
snprintf
(
name
,
sizeof
(
name
),
"radeonbl%d"
,
rinfo
->
info
->
node
);
snprintf
(
name
,
sizeof
(
name
),
"radeonbl%d"
,
rinfo
->
info
->
node
);
bd
=
backlight_device_register
(
name
,
pdata
,
&
radeon_bl_data
);
bd
=
backlight_device_register
(
name
,
rinfo
->
info
->
dev
,
pdata
,
&
radeon_bl_data
);
if
(
IS_ERR
(
bd
))
{
if
(
IS_ERR
(
bd
))
{
rinfo
->
info
->
bl_dev
=
NULL
;
rinfo
->
info
->
bl_dev
=
NULL
;
printk
(
"radeonfb: Backlight registration failed
\n
"
);
printk
(
"radeonfb: Backlight registration failed
\n
"
);
...
...
drivers/video/backlight/backlight.c
View file @
40b20c25
...
@@ -216,8 +216,10 @@ static const struct class_device_attribute bl_class_device_attributes[] = {
...
@@ -216,8 +216,10 @@ static const struct class_device_attribute bl_class_device_attributes[] = {
* Creates and registers new backlight class_device. Returns either an
* Creates and registers new backlight class_device. Returns either an
* ERR_PTR() or a pointer to the newly allocated device.
* ERR_PTR() or a pointer to the newly allocated device.
*/
*/
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
void
*
devdata
,
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
struct
backlight_properties
*
bp
)
struct
device
*
dev
,
void
*
devdata
,
struct
backlight_properties
*
bp
)
{
{
int
i
,
rc
;
int
i
,
rc
;
struct
backlight_device
*
new_bd
;
struct
backlight_device
*
new_bd
;
...
@@ -232,6 +234,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
...
@@ -232,6 +234,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
new_bd
->
props
=
bp
;
new_bd
->
props
=
bp
;
memset
(
&
new_bd
->
class_dev
,
0
,
sizeof
(
new_bd
->
class_dev
));
memset
(
&
new_bd
->
class_dev
,
0
,
sizeof
(
new_bd
->
class_dev
));
new_bd
->
class_dev
.
class
=
&
backlight_class
;
new_bd
->
class_dev
.
class
=
&
backlight_class
;
new_bd
->
class_dev
.
dev
=
dev
;
strlcpy
(
new_bd
->
class_dev
.
class_id
,
name
,
KOBJ_NAME_LEN
);
strlcpy
(
new_bd
->
class_dev
.
class_id
,
name
,
KOBJ_NAME_LEN
);
class_set_devdata
(
&
new_bd
->
class_dev
,
devdata
);
class_set_devdata
(
&
new_bd
->
class_dev
,
devdata
);
...
...
drivers/video/nvidia/nv_backlight.c
View file @
40b20c25
...
@@ -141,7 +141,7 @@ void nvidia_bl_init(struct nvidia_par *par)
...
@@ -141,7 +141,7 @@ void nvidia_bl_init(struct nvidia_par *par)
snprintf
(
name
,
sizeof
(
name
),
"nvidiabl%d"
,
info
->
node
);
snprintf
(
name
,
sizeof
(
name
),
"nvidiabl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
nvidia_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
nvidia_bl_data
);
if
(
IS_ERR
(
bd
))
{
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"nvidia: Backlight registration failed
\n
"
);
printk
(
KERN_WARNING
"nvidia: Backlight registration failed
\n
"
);
...
...
drivers/video/riva/fbdev.c
View file @
40b20c25
...
@@ -384,7 +384,7 @@ static void riva_bl_init(struct riva_par *par)
...
@@ -384,7 +384,7 @@ static void riva_bl_init(struct riva_par *par)
snprintf
(
name
,
sizeof
(
name
),
"rivabl%d"
,
info
->
node
);
snprintf
(
name
,
sizeof
(
name
),
"rivabl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
riva_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
riva_bl_data
);
if
(
IS_ERR
(
bd
))
{
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"riva: Backlight registration failed
\n
"
);
printk
(
KERN_WARNING
"riva: Backlight registration failed
\n
"
);
...
...
include/linux/backlight.h
View file @
40b20c25
...
@@ -54,7 +54,7 @@ struct backlight_device {
...
@@ -54,7 +54,7 @@ struct backlight_device {
};
};
extern
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
extern
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
void
*
devdata
,
struct
backlight_properties
*
bp
);
struct
device
*
dev
,
void
*
devdata
,
struct
backlight_properties
*
bp
);
extern
void
backlight_device_unregister
(
struct
backlight_device
*
bd
);
extern
void
backlight_device_unregister
(
struct
backlight_device
*
bd
);
#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment