Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
5d0c288b
Commit
5d0c288b
authored
Dec 07, 2006
by
Alexey Starikovskiy
Committed by
Len Brown
Dec 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: ec: Query only single query at a time.
Signed-off-by:
Len Brown
<
len.brown@intel.com
>
parent
e41334c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
drivers/acpi/ec.c
drivers/acpi/ec.c
+8
-11
No files found.
drivers/acpi/ec.c
View file @
5d0c288b
...
...
@@ -104,6 +104,7 @@ struct acpi_ec {
unsigned
long
data_addr
;
unsigned
long
global_lock
;
struct
semaphore
sem
;
atomic_t
query_pending
;
atomic_t
leaving_burst
;
/* 0 : No, 1 : Yes, 2: abort */
wait_queue_head_t
wait
;
}
*
ec_ecdt
;
...
...
@@ -257,6 +258,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
command
);
goto
end
;
}
}
else
if
(
command
==
ACPI_EC_COMMAND_QUERY
)
{
atomic_set
(
&
ec
->
query_pending
,
0
);
}
for
(;
rdata_len
>
0
;
rdata_len
--
)
{
...
...
@@ -425,17 +428,9 @@ static void acpi_ec_gpe_query(void *ec_cxt)
{
struct
acpi_ec
*
ec
=
(
struct
acpi_ec
*
)
ec_cxt
;
u8
value
=
0
;
static
char
object_name
[
8
];
char
object_name
[
8
];
if
(
!
ec
)
return
;
value
=
acpi_ec_read_status
(
ec
);
if
(
!
(
value
&
ACPI_EC_FLAG_SCI
))
return
;
if
(
acpi_ec_query
(
ec
,
&
value
))
if
(
!
ec
||
acpi_ec_query
(
ec
,
&
value
))
return
;
snprintf
(
object_name
,
8
,
"_Q%2.2X"
,
value
);
...
...
@@ -457,7 +452,8 @@ static u32 acpi_ec_gpe_handler(void *data)
}
value
=
acpi_ec_read_status
(
ec
);
if
(
value
&
ACPI_EC_FLAG_SCI
)
{
if
((
value
&
ACPI_EC_FLAG_SCI
)
&&
!
atomic_read
(
&
ec
->
query_pending
))
{
atomic_set
(
&
ec
->
query_pending
,
1
);
status
=
acpi_os_execute
(
OSL_EC_BURST_HANDLER
,
acpi_ec_gpe_query
,
ec
);
}
...
...
@@ -652,6 +648,7 @@ static int acpi_ec_add(struct acpi_device *device)
ec
->
handle
=
device
->
handle
;
ec
->
uid
=
-
1
;
init_MUTEX
(
&
ec
->
sem
);
atomic_set
(
&
ec
->
query_pending
,
0
);
if
(
acpi_ec_mode
==
EC_INTR
)
{
atomic_set
(
&
ec
->
leaving_burst
,
1
);
init_waitqueue_head
(
&
ec
->
wait
);
...
...
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