Enabling USB Selective Suspend for HID Devices

Revision 2.0 of the Universal Serial Bus Specification specifies a USB selective suspend feature. By using this feature, the Windows operating system can selectively suspend idle USB devices. This allows Windows to efficiently manage the power requirements of the overall system. For more information about how Windows supports the USB selective suspend feature, see USB Selective Suspend. (This resource may not be available in some languages and countries.)

Independent hardware vendors (IHVs) can enable the USB selective suspend feature for their HID devices by using the device's information (INF) file. The following is a sample INF file that shows how to enable this USB feature in Windows:


; XYZ Vendor INF File for USB HID devices
;
; A sample INF for a stand-alone USB HID device that supports 
; selective suspend

[Version]
Signature            = "$Windows NT$"
Provider             = %ProviderName%
Class                = HIDClass
CLASSGUID            = {745a17a0-74d3-11d0-b6fe-00a0c90f57da};
DriverVer            = 9/19/2008,6.0.0.0                    
CatalogFile.NT       = HIDXYZ1.CAB

[ControlFlags]
ExcludeFromSelect=*

[SourceDisksNames]
1=%SourceDisk%,,1

[Manufacturer]
%ManufacturerName% = XYZHID,NT.6.0,NTx86,NTamd64

; Match on a hardware ID generated by the device, for x86 and x64.

[ZYXHID.NT.6.0]
%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy
[ZYXHID.NTx86]
%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy
[ZYXHID.NTamd64]
%HIDDevice1%       = HIDSelSusp1.NT.6.0, USB\VID_xxxx&PID_yyyy

; Windows Vista-specific sections -------------------------

[HIDSelSusp1.NT.6.0]
include     = input.inf
needs       = HID_SelSus_Inst.NT

[HIDSelSusp1.NT.6.0.HW]
include     = input.inf
needs       = HID_SelSus_Inst.NT.HW

[HIDSelSusp1.NT.6.0.Services]
include     = input.inf
needs       = HID_SelSus_Inst.NT.Services

[Strings]
; While strings are localizable, in this sample INF, we have
; not created any localized strings.
ProviderName     = "Vendor XYZ (c)"
ManufacturerName = "Vendor XYZ (c)"
BthRadio1        = "Selective Suspend HID from XYZ (c)"
SourceDisk       = "Vendor XYZ (c) source disk"

Where:

  1. The INF Version section should have the CLASSGUID and DriverVer directives set as follows:

    • The CLASSGUID directive must specify the Microsoft class GUID for HID devices. This GUID has the value {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.

    • The DriverVer directive must have a value that has a newer date and greater version number than the value specified by the DriverVer directive in Input.inf.

  2. The ZYXHID.NT.6.0, ZYXHID.NTx86, and ZYXHID.NTamd64 sections specify the hardware identifier (ID) for the vendor's HID device. The hardware ID consists of a vendor identifier (VID) and product identifier (PID). Each hardware ID for a device must have VID/PID values that are unique to the vendor and device. This ensures that the same hardware ID does not correspond to multiple names and settings.

  3. The HIDSelSusp1.NT.6.0 and HIDSelSusp1.NT.6.0.HW sections are INF DDInstall sections. In this example, these sections contain INF Include and Needs directives.

    The Include directives reference the system-supplied Input.inf file, which contains INF sections needed to enable the USB selective suspend feature for the vendor's HID device.

    The Needs directives indicate which sections from Input.inf should be processed during device installation. In this case, the HID_SelSus_Inst section is selected instead of the default HID_Inst section, which does not support selective suspend.

  4. The HIDSelSusp1.NT.6.0.Services section is an INF DDInstall.HW section. In this example, the section also contains the same values for the INF Include and Needs directives.

 

 

Send comments about this topic to Microsoft

Build date: 2/17/2012

Show:
© 2014 Microsoft