mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 07:40:09 +08:00
[ACPI] Report a docking device to the system
This commit is contained in:
@@ -419,6 +419,10 @@ Bus_PDO_QueryDeviceCaps(
|
||||
deviceCapabilities->Address = device->pnp.bus_address;
|
||||
}
|
||||
|
||||
if (DeviceData->DockDevice)
|
||||
deviceCapabilities->DockDevice = TRUE;
|
||||
DPRINT("DockDevice: %u\n", deviceCapabilities->DockDevice);
|
||||
|
||||
if (!device ||
|
||||
(device->flags.hardware_id &&
|
||||
(strstr(device->pnp.hardware_id, ACPI_BUTTON_HID_LID) ||
|
||||
|
||||
@@ -42,6 +42,7 @@ typedef struct _PDO_DEVICE_DATA
|
||||
// An array of (zero terminated wide character strings).
|
||||
// The array itself also null terminated
|
||||
PWCHAR HardwareIDs;
|
||||
BOOLEAN DockDevice;
|
||||
// Link point to hold all the PDOs for a single bus together
|
||||
LIST_ENTRY Link;
|
||||
ULONG InterfaceRefCount;
|
||||
|
||||
@@ -422,6 +422,8 @@ Bus_InitializePdo (
|
||||
PPDO_DEVICE_DATA pdoData;
|
||||
int acpistate;
|
||||
DEVICE_POWER_STATE ntState;
|
||||
ACPI_HANDLE handle = 0;
|
||||
ACPI_STATUS status = 0;
|
||||
|
||||
PAGED_CODE ();
|
||||
|
||||
@@ -468,6 +470,17 @@ Bus_InitializePdo (
|
||||
pdoData->Common.DevicePowerState = ntState;
|
||||
pdoData->Common.SystemPowerState = FdoData->Common.SystemPowerState;
|
||||
|
||||
/* Identify the dock device */
|
||||
if (pdoData->AcpiHandle)
|
||||
{
|
||||
status = AcpiGetHandle(pdoData->AcpiHandle, "_DCK", &handle);
|
||||
if (ACPI_SUCCESS(status))
|
||||
{
|
||||
DPRINT("Found _DCK method!");
|
||||
pdoData->DockDevice = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
ExAcquireFastMutex (&FdoData->Mutex);
|
||||
InsertTailList(&FdoData->ListOfPDOs, &pdoData->Link);
|
||||
FdoData->NumPDOs++;
|
||||
|
||||
Reference in New Issue
Block a user