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
nexedi
linux
Commits
88da765f
Commit
88da765f
authored
Aug 08, 2008
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: bcm5974 - implement autosuspend support
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
f89bd95c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
drivers/input/mouse/bcm5974.c
drivers/input/mouse/bcm5974.c
+12
-0
No files found.
drivers/input/mouse/bcm5974.c
View file @
88da765f
...
@@ -150,6 +150,7 @@ struct bcm5974_config {
...
@@ -150,6 +150,7 @@ struct bcm5974_config {
struct
bcm5974
{
struct
bcm5974
{
char
phys
[
64
];
char
phys
[
64
];
struct
usb_device
*
udev
;
/* usb device */
struct
usb_device
*
udev
;
/* usb device */
struct
usb_interface
*
intf
;
/* our interface */
struct
input_dev
*
input
;
/* input dev */
struct
input_dev
*
input
;
/* input dev */
struct
bcm5974_config
cfg
;
/* device configuration */
struct
bcm5974_config
cfg
;
/* device configuration */
struct
mutex
pm_mutex
;
/* serialize access to open/suspend */
struct
mutex
pm_mutex
;
/* serialize access to open/suspend */
...
@@ -478,6 +479,10 @@ static int bcm5974_open(struct input_dev *input)
...
@@ -478,6 +479,10 @@ static int bcm5974_open(struct input_dev *input)
struct
bcm5974
*
dev
=
input_get_drvdata
(
input
);
struct
bcm5974
*
dev
=
input_get_drvdata
(
input
);
int
error
;
int
error
;
error
=
usb_autopm_get_interface
(
dev
->
intf
);
if
(
error
)
return
error
;
mutex_lock
(
&
dev
->
pm_mutex
);
mutex_lock
(
&
dev
->
pm_mutex
);
error
=
bcm5974_start_traffic
(
dev
);
error
=
bcm5974_start_traffic
(
dev
);
...
@@ -486,6 +491,9 @@ static int bcm5974_open(struct input_dev *input)
...
@@ -486,6 +491,9 @@ static int bcm5974_open(struct input_dev *input)
mutex_unlock
(
&
dev
->
pm_mutex
);
mutex_unlock
(
&
dev
->
pm_mutex
);
if
(
error
)
usb_autopm_put_interface
(
dev
->
intf
);
return
error
;
return
error
;
}
}
...
@@ -499,6 +507,8 @@ static void bcm5974_close(struct input_dev *input)
...
@@ -499,6 +507,8 @@ static void bcm5974_close(struct input_dev *input)
dev
->
opened
=
0
;
dev
->
opened
=
0
;
mutex_unlock
(
&
dev
->
pm_mutex
);
mutex_unlock
(
&
dev
->
pm_mutex
);
usb_autopm_put_interface
(
dev
->
intf
);
}
}
static
int
bcm5974_suspend
(
struct
usb_interface
*
iface
,
pm_message_t
message
)
static
int
bcm5974_suspend
(
struct
usb_interface
*
iface
,
pm_message_t
message
)
...
@@ -551,6 +561,7 @@ static int bcm5974_probe(struct usb_interface *iface,
...
@@ -551,6 +561,7 @@ static int bcm5974_probe(struct usb_interface *iface,
}
}
dev
->
udev
=
udev
;
dev
->
udev
=
udev
;
dev
->
intf
=
iface
;
dev
->
input
=
input_dev
;
dev
->
input
=
input_dev
;
dev
->
cfg
=
*
cfg
;
dev
->
cfg
=
*
cfg
;
mutex_init
(
&
dev
->
pm_mutex
);
mutex_init
(
&
dev
->
pm_mutex
);
...
@@ -652,6 +663,7 @@ static struct usb_driver bcm5974_driver = {
...
@@ -652,6 +663,7 @@ static struct usb_driver bcm5974_driver = {
.
resume
=
bcm5974_resume
,
.
resume
=
bcm5974_resume
,
.
reset_resume
=
bcm5974_resume
,
.
reset_resume
=
bcm5974_resume
,
.
id_table
=
bcm5974_table
,
.
id_table
=
bcm5974_table
,
.
supports_autosuspend
=
1
,
};
};
static
int
__init
bcm5974_init
(
void
)
static
int
__init
bcm5974_init
(
void
)
...
...
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