Enabling Wake-on-Touch With Inbox Drivers
This topic discusses how to implement Wake-on-Touch with the inbox HIDI2C, HIDSPI, or HIDUSB drivers.
Inbox HIDI2C Driver
The inbox HIDI2C driver sends the command SetPower(Sleep) whenever the device enters a lower power state. That happens to both transitions to D2 and D3.
How to Enable Wake-on-Touch
- Define wake resources and capabilities in ACPI as per the ACPI Firmware Requirements section in the Wake-on-Touch Implementation Guide.
- In response to the SetPower(Sleep) command, the touch controller firmware should enable Wake-on-Touch.
- In response to the transition from D0 to D3Hot, although a SetPower(Sleep) command is still sent to the device, the ACPI firmware should leave the minimal power resources on the touch controller, since Wake-on-Touch is not needed.
- If D3Cold is supported, in response to the transition from D3Hot to D3Cold, the ACPI firmware may shut all the power resources of the touch controller.
- Build an INF to opt-in the Wake-on-Touch policy as per the INF Requirements section below.
- Validate that the device wakes up on the appropriate touch gesture(s), based on the OEM requirements and/or form-factor of the device. Also validate that it does not cause spurious wake events and the power consumption from enabling the feature is acceptable. See Wake-on-Touch Validation Guide.
Inbox HIDSPI Driver
The HIDSPI driver sends SetPower(Sleep) command when the device is entering D2. This command is defined in the HIDSPI specification.
For D3(Hot), the HIDSPI driver sends SetPower(Off) command, instead of SetPower(Sleep). This command is defined in the HIDSPI specification.
How to Enable Wake-on-Touch
- Define wake resources and capabilities in ACPI as per the ACPI Firmware Requirements in the Wake-on-Touch Implementation Guide.
- In response to the SetPower(Sleep) command, the touch controller firmware should enable Wake-on-Touch.
- In response to the SetPower(Off) command, the touch controller firmware should enter the Off state where minimal power is consumed, just in case D3Cold is not supported and the touch controller may stay at D3Hot forever.
- If D3Cold is supported, in response to the transition from D3Hot to D3Cold, the ACPI firmware may shut all the power resources of the touch controller.
- Build an INF to opt-in the Wake-on-Touch policy as per the INF Requirements section below.
- Validate that the device wakes up on the appropriate touch gesture(s), based on the OEM requirements and/or form-factor of the device. Also validate that it does not cause spurious wake events and the power consumption from enabling the feature is acceptable. See Wake-on-Touch Validation Guide.
Inbox HIDUSB Driver
How to Enable Wake-on-Touch
- Build an INF to opt-in the Wake-on-Touch policy as per the INF Requirements section below.
- To meet the minimum requirements defined in Windows Hardware Compatibility (WHCP), an internal USB touch device is required to support Selective Suspend. For more information about how to enable Selective Suspend, please refer to the Selective suspend for HID over USB devices documentation.
- In response to D2 or port suspend, the device firmware should enable Wake-on-Touch. Depending on the HID feature report for latency setting, the device firmware may choose different scan rates or gestures for Wake-on-Touch to achieve better user experience. For more information regarding the latency settings, please refer to the “USB Devices” section in the Touchscreen Power Management documentation.
- Validate that the device wakes up on the appropriate touch gesture(s), based on the OEM requirements and/or form-factor of the device. Also validate that it does not cause spurious wake events and the power consumption from enabling the feature is acceptable. See Wake-on-Touch Validation Guide.
Note
If the USB touch is implemented as a USB function of a USB 3.0 multi-function device, it should support “function suspend” so the touch function can enter a low-power state for Wake-on-Touch independently of other functions. The Microsoft-provided parent driver (Usbccgp.sys) supports function suspend and remote wake-up features.
INF Requirements
The HIDClass Wake-on-Touch power policy is not opted-in by default.
For the touch controllers that use inbox drivers (HIDUSB/HIDI2C/HIDSPI), OEMs/IHVs should create an INF, and add the following to its DDInstall.HW section to opt-in the Wake-on-Touch policy.
Include = input.inf
Needs = WakeScreenOnTouch.HW
The Selective suspend for HID over USB devices MSDN article gives an example of how an OEM/IHV INF references the inbox INPUT.INF to enable a different feature named Selective Suspend. OEMs/IHVs may do similar in their INF but referencing the section mentioned above to enable Wake-on-Touch.
To simplify this INF, OEMs/IHVs may also consider creating an Extension INF instead. For more information regarding Extension INF, please refer to the Using an Extension INF file documentation.
If the device has opt-ed in any other HID policy that conflicts with the Wake-on-Touch policy, either of the policies will be ignored.
If the device has multiple HID collections including touch screen collections (UsagePage:0xD, Usage:0x4) and non-touch-screen collections, the touch firmware should only support wake from the touch screen collections. If a non-touch-screen collection may signal wake too, the device will be still brought back to D0 to drain the power.