Within the documented GpioClx model, there is no supported mechanism to partially initialize GpioClx and still have a fully started device node when the GpioClx initialization path fails due to missing ACPI/ASL resources.
Key points from the GpioClx design:
- GpioClx is tightly coupled to ACPI-enumerated GPIO controllers and resources
- GPIO controllers and the peripherals that connect to them are enumerated by ACPI, and the relationship between controllers and peripherals is described using GPIO Connection Resource Descriptors in the firmware namespace (_CRS, GpioInt/GpioIo, etc.).
- The GPIO controller device’s ACPI namespace (_HID, _CRS, optional _UID) defines the controller’s resources and the bank/interrupt mapping. GpioClx relies on this ACPI description to know what hardware resources exist and how to manage them.
- The GpioClx DDI is defined for a GPIO controller driver that cooperates with GpioClx to handle I/O and interrupts for GPIO pins that are configured as data inputs/outputs or interrupt inputs. This model assumes a properly described ACPI controller device.
- Device object initialization with GpioClx is all-or-nothing
- The documented initialization sequence requires the GPIO controller driver to call:
-
GPIO_CLX_ProcessAddDevicePreDeviceCreatebeforeWdfDeviceCreate, and -
GPIO_CLX_ProcessAddDevicePostDeviceCreateafterWdfDeviceCreate.
-
- These calls are part of bringing the controller under GpioClx management. If
GPIO_CLX_ProcessAddDevicePostDeviceCreatefails (for example, because required ACPI resources are not present), the GpioClx state machine is not initialized, and GpioClx will not call the client callbacks such asCLIENT_QueryControllerBasicInformationorCLIENT_StartController. - Bypassing the failure in
EvtDeviceAdddoes not change this: the GpioClx extension has already failed its own initialization and will not operate in a “partial” mode.
- The documented initialization sequence requires the GPIO controller driver to call:
- GpioClx is not designed as a generic IOCTL transport independent of ACPI GPIO resources
- The documented purpose of GpioClx is to manage GPIO pins and interrupts for ACPI-described GPIO controllers and to provide a uniform GPIO I/O interface to peripheral drivers.
- The framework does not expose a supported mode where the controller driver can use GpioClx only for
CLIENT_ControllerSpecificFunction/IOCTL handling while ignoring missing ACPI GPIO resources. The controller-specific IOCTL path is an extension on top of a fully initialized GpioClx controller, not an independent mode.
- Implication for the described requirement
Based on the documented model:- If ACPI/ASL for the GPIO controller is present and correct: use GpioClx normally for GPIO + interrupts + wake, and expose controller-specific IOCTLs via
CLIENT_ControllerSpecificFunction. - If ACPI/ASL for the controller is absent or incomplete: GpioClx initialization is not supported to succeed in a “GPIO-disabled but IOCTL-only” mode. The framework expects a valid ACPI-described controller; otherwise, the GpioClx-based device will not fully start.
- If ACPI/ASL for the GPIO controller is present and correct: use GpioClx normally for GPIO + interrupts + wake, and expose controller-specific IOCTLs via
There are no documented patterns or best practices in the provided material that describe a partial or degraded GpioClx initialization mode where the device node starts successfully without ACPI-described GPIO resources while still using GpioClx for IOCTL-only operations.
References: