Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
ea261051
Commit
ea261051
authored
Sep 26, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bjorn-HID' into release
parents
6d7f18f6
57f3674f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
315 additions
and
483 deletions
+315
-483
drivers/acpi/bus.c
drivers/acpi/bus.c
+22
-27
drivers/acpi/scan.c
drivers/acpi/scan.c
+272
-433
drivers/pci/hotplug/acpiphp_ibm.c
drivers/pci/hotplug/acpiphp_ibm.c
+0
-1
drivers/pnp/pnpacpi/core.c
drivers/pnp/pnpacpi/core.c
+9
-12
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+12
-10
No files found.
drivers/acpi/bus.c
View file @
ea261051
...
@@ -94,36 +94,33 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
...
@@ -94,36 +94,33 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
EXPORT_SYMBOL
(
acpi_bus_get_device
);
EXPORT_SYMBOL
(
acpi_bus_get_device
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
)
acpi_status
acpi_bus_get_status_handle
(
acpi_handle
handle
,
unsigned
long
long
*
sta
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
;
unsigned
long
long
sta
=
0
;
if
(
!
device
)
status
=
acpi_evaluate_integer
(
handle
,
"_STA"
,
NULL
,
sta
);
return
-
EINVAL
;
if
(
ACPI_SUCCESS
(
status
))
return
AE_OK
;
/*
if
(
status
==
AE_NOT_FOUND
)
{
* Evaluate _STA if present.
*
sta
=
ACPI_STA_DEVICE_PRESENT
|
ACPI_STA_DEVICE_ENABLED
|
*/
ACPI_STA_DEVICE_UI
|
ACPI_STA_DEVICE_FUNCTIONING
;
if
(
device
->
flags
.
dynamic_status
)
{
return
AE_OK
;
status
=
acpi_evaluate_integer
(
device
->
handle
,
"_STA"
,
NULL
,
&
sta
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
STRUCT_TO_INT
(
device
->
status
)
=
(
int
)
sta
;
}
}
return
status
;
}
/*
int
acpi_bus_get_status
(
struct
acpi_device
*
device
)
* According to ACPI spec some device can be present and functional
{
* even if the parent is not present but functional.
acpi_status
status
;
* In such conditions the child device should not inherit the status
unsigned
long
long
sta
;
* from the parent.
*/
status
=
acpi_bus_get_status_handle
(
device
->
handle
,
&
sta
);
else
if
(
ACPI_FAILURE
(
status
))
STRUCT_TO_INT
(
device
->
status
)
=
return
-
ENODEV
;
ACPI_STA_DEVICE_PRESENT
|
ACPI_STA_DEVICE_ENABLED
|
ACPI_STA_DEVICE_UI
|
ACPI_STA_DEVICE_FUNCTIONING
;
STRUCT_TO_INT
(
device
->
status
)
=
(
int
)
sta
;
if
(
device
->
status
.
functional
&&
!
device
->
status
.
present
)
{
if
(
device
->
status
.
functional
&&
!
device
->
status
.
present
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]: "
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]: "
...
@@ -135,10 +132,8 @@ int acpi_bus_get_status(struct acpi_device *device)
...
@@ -135,10 +132,8 @@ int acpi_bus_get_status(struct acpi_device *device)
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]
\n
"
,
device
->
pnp
.
bus_id
,
device
->
pnp
.
bus_id
,
(
u32
)
STRUCT_TO_INT
(
device
->
status
)));
(
u32
)
STRUCT_TO_INT
(
device
->
status
)));
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
acpi_bus_get_status
);
EXPORT_SYMBOL
(
acpi_bus_get_status
);
void
acpi_bus_private_data_handler
(
acpi_handle
handle
,
void
acpi_bus_private_data_handler
(
acpi_handle
handle
,
...
...
drivers/acpi/scan.c
View file @
ea261051
This diff is collapsed.
Click to expand it.
drivers/pci/hotplug/acpiphp_ibm.c
View file @
ea261051
...
@@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
...
@@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
__func__
,
status
);
__func__
,
status
);
return
retval
;
return
retval
;
}
}
info
->
hardware_id
.
string
[
sizeof
(
info
->
hardware_id
.
length
)
-
1
]
=
'\0'
;
if
(
info
->
current_status
&&
(
info
->
valid
&
ACPI_VALID_HID
)
&&
if
(
info
->
current_status
&&
(
info
->
valid
&
ACPI_VALID_HID
)
&&
(
!
strcmp
(
info
->
hardware_id
.
string
,
IBM_HARDWARE_ID1
)
||
(
!
strcmp
(
info
->
hardware_id
.
string
,
IBM_HARDWARE_ID1
)
||
...
...
drivers/pnp/pnpacpi/core.c
View file @
ea261051
...
@@ -153,6 +153,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
...
@@ -153,6 +153,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
acpi_handle
temp
=
NULL
;
acpi_handle
temp
=
NULL
;
acpi_status
status
;
acpi_status
status
;
struct
pnp_dev
*
dev
;
struct
pnp_dev
*
dev
;
struct
acpi_hardware_id
*
id
;
/*
/*
* If a PnPacpi device is not present , the device
* If a PnPacpi device is not present , the device
...
@@ -193,15 +194,12 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
...
@@ -193,15 +194,12 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
if
(
dev
->
capabilities
&
PNP_CONFIGURABLE
)
if
(
dev
->
capabilities
&
PNP_CONFIGURABLE
)
pnpacpi_parse_resource_option_data
(
dev
);
pnpacpi_parse_resource_option_data
(
dev
);
if
(
device
->
flags
.
compatible_ids
)
{
list_for_each_entry
(
id
,
&
device
->
pnp
.
ids
,
list
)
{
struct
acpica_device_id_list
*
cid_list
=
device
->
pnp
.
cid_list
;
if
(
!
strcmp
(
id
->
id
,
acpi_device_hid
(
device
)))
int
i
;
continue
;
if
(
!
ispnpidacpi
(
id
->
id
))
for
(
i
=
0
;
i
<
cid_list
->
count
;
i
++
)
{
continue
;
if
(
!
ispnpidacpi
(
cid_list
->
ids
[
i
].
string
))
pnp_add_id
(
dev
,
id
->
id
);
continue
;
pnp_add_id
(
dev
,
cid_list
->
ids
[
i
].
string
);
}
}
}
/* clear out the damaged flags */
/* clear out the damaged flags */
...
@@ -232,9 +230,8 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp)
...
@@ -232,9 +230,8 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp)
struct
pnp_dev
*
pnp
=
_pnp
;
struct
pnp_dev
*
pnp
=
_pnp
;
/* true means it matched */
/* true means it matched */
return
acpi
->
flags
.
hardware_id
return
!
acpi_get_physical_device
(
acpi
->
handle
)
&&
!
acpi_get_physical_device
(
acpi
->
handle
)
&&
compare_pnp_id
(
pnp
->
id
,
acpi_device_hid
(
acpi
));
&&
compare_pnp_id
(
pnp
->
id
,
acpi
->
pnp
.
hardware_id
);
}
}
static
int
__init
acpi_pnp_find_device
(
struct
device
*
dev
,
acpi_handle
*
handle
)
static
int
__init
acpi_pnp_find_device
(
struct
device
*
dev
,
acpi_handle
*
handle
)
...
...
include/acpi/acpi_bus.h
View file @
ea261051
...
@@ -70,7 +70,6 @@ enum acpi_bus_device_type {
...
@@ -70,7 +70,6 @@ enum acpi_bus_device_type {
ACPI_BUS_TYPE_POWER
,
ACPI_BUS_TYPE_POWER
,
ACPI_BUS_TYPE_PROCESSOR
,
ACPI_BUS_TYPE_PROCESSOR
,
ACPI_BUS_TYPE_THERMAL
,
ACPI_BUS_TYPE_THERMAL
,
ACPI_BUS_TYPE_SYSTEM
,
ACPI_BUS_TYPE_POWER_BUTTON
,
ACPI_BUS_TYPE_POWER_BUTTON
,
ACPI_BUS_TYPE_SLEEP_BUTTON
,
ACPI_BUS_TYPE_SLEEP_BUTTON
,
ACPI_BUS_DEVICE_TYPE_COUNT
ACPI_BUS_DEVICE_TYPE_COUNT
...
@@ -142,10 +141,7 @@ struct acpi_device_status {
...
@@ -142,10 +141,7 @@ struct acpi_device_status {
struct
acpi_device_flags
{
struct
acpi_device_flags
{
u32
dynamic_status
:
1
;
u32
dynamic_status
:
1
;
u32
hardware_id
:
1
;
u32
compatible_ids
:
1
;
u32
bus_address
:
1
;
u32
bus_address
:
1
;
u32
unique_id
:
1
;
u32
removable
:
1
;
u32
removable
:
1
;
u32
ejectable
:
1
;
u32
ejectable
:
1
;
u32
lockable
:
1
;
u32
lockable
:
1
;
...
@@ -154,7 +150,7 @@ struct acpi_device_flags {
...
@@ -154,7 +150,7 @@ struct acpi_device_flags {
u32
performance_manageable
:
1
;
u32
performance_manageable
:
1
;
u32
wake_capable
:
1
;
/* Wakeup(_PRW) supported? */
u32
wake_capable
:
1
;
/* Wakeup(_PRW) supported? */
u32
force_power_state
:
1
;
u32
force_power_state
:
1
;
u32
reserved
:
19
;
u32
reserved
:
22
;
};
};
/* File System */
/* File System */
...
@@ -172,20 +168,23 @@ typedef unsigned long acpi_bus_address;
...
@@ -172,20 +168,23 @@ typedef unsigned long acpi_bus_address;
typedef
char
acpi_device_name
[
40
];
typedef
char
acpi_device_name
[
40
];
typedef
char
acpi_device_class
[
20
];
typedef
char
acpi_device_class
[
20
];
struct
acpi_hardware_id
{
struct
list_head
list
;
char
*
id
;
};
struct
acpi_device_pnp
{
struct
acpi_device_pnp
{
acpi_bus_id
bus_id
;
/* Object name */
acpi_bus_id
bus_id
;
/* Object name */
acpi_bus_address
bus_address
;
/* _ADR */
acpi_bus_address
bus_address
;
/* _ADR */
char
*
hardware_id
;
/* _HID */
struct
acpica_device_id_list
*
cid_list
;
/* _CIDs */
char
*
unique_id
;
/* _UID */
char
*
unique_id
;
/* _UID */
struct
list_head
ids
;
/* _HID and _CIDs */
acpi_device_name
device_name
;
/* Driver-determined */
acpi_device_name
device_name
;
/* Driver-determined */
acpi_device_class
device_class
;
/* " */
acpi_device_class
device_class
;
/* " */
};
};
#define acpi_device_bid(d) ((d)->pnp.bus_id)
#define acpi_device_bid(d) ((d)->pnp.bus_id)
#define acpi_device_adr(d) ((d)->pnp.bus_address)
#define acpi_device_adr(d) ((d)->pnp.bus_address)
#define acpi_device_hid(d) ((d)->pnp.hardware_id)
char
*
acpi_device_hid
(
struct
acpi_device
*
device
);
#define acpi_device_uid(d) ((d)->pnp.unique_id)
#define acpi_device_name(d) ((d)->pnp.device_name)
#define acpi_device_name(d) ((d)->pnp.device_name)
#define acpi_device_class(d) ((d)->pnp.device_class)
#define acpi_device_class(d) ((d)->pnp.device_class)
...
@@ -262,7 +261,8 @@ struct acpi_device_wakeup {
...
@@ -262,7 +261,8 @@ struct acpi_device_wakeup {
/* Device */
/* Device */
struct
acpi_device
{
struct
acpi_device
{
acpi_handle
handle
;
int
device_type
;
acpi_handle
handle
;
/* no handle for fixed hardware */
struct
acpi_device
*
parent
;
struct
acpi_device
*
parent
;
struct
list_head
children
;
struct
list_head
children
;
struct
list_head
node
;
struct
list_head
node
;
...
@@ -322,6 +322,8 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
...
@@ -322,6 +322,8 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
int
acpi_bus_get_device
(
acpi_handle
handle
,
struct
acpi_device
**
device
);
int
acpi_bus_get_device
(
acpi_handle
handle
,
struct
acpi_device
**
device
);
void
acpi_bus_data_handler
(
acpi_handle
handle
,
void
*
context
);
void
acpi_bus_data_handler
(
acpi_handle
handle
,
void
*
context
);
acpi_status
acpi_bus_get_status_handle
(
acpi_handle
handle
,
unsigned
long
long
*
sta
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
);
int
acpi_bus_get_power
(
acpi_handle
handle
,
int
*
state
);
int
acpi_bus_get_power
(
acpi_handle
handle
,
int
*
state
);
int
acpi_bus_set_power
(
acpi_handle
handle
,
int
state
);
int
acpi_bus_set_power
(
acpi_handle
handle
,
int
state
);
...
...
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