drivers/platform/surface/surface_gpe.c
Source file repositories/reference/linux-study-clean/drivers/platform/surface/surface_gpe.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/surface/surface_gpe.c- Extension
.c- Size
- 9066 bytes
- Lines
- 353
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/dmi.hlinux/kernel.hlinux/module.hlinux/platform_device.h
Detected Declarations
struct surface_lid_devicefunction surface_lid_enable_wakeupfunction surface_gpe_suspendfunction surface_gpe_resumefunction surface_gpe_probefunction surface_gpe_removefunction surface_gpe_initfunction surface_gpe_exitmodule init surface_gpe_init
Annotated Snippet
module_init(surface_gpe_init);
static void __exit surface_gpe_exit(void)
{
struct fwnode_handle *fwnode = surface_gpe_device->dev.fwnode;
platform_device_unregister(surface_gpe_device);
platform_driver_unregister(&surface_gpe_driver);
fwnode_remove_software_node(fwnode);
}
module_exit(surface_gpe_exit);
MODULE_AUTHOR("Maximilian Luz <luzmaximilian@gmail.com>");
MODULE_DESCRIPTION("Surface GPE/Lid Driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("dmi:*:svnMicrosoftCorporation:pnSurface*:*");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/dmi.h`, `linux/kernel.h`, `linux/module.h`, `linux/platform_device.h`.
- Detected declarations: `struct surface_lid_device`, `function surface_lid_enable_wakeup`, `function surface_gpe_suspend`, `function surface_gpe_resume`, `function surface_gpe_probe`, `function surface_gpe_remove`, `function surface_gpe_init`, `function surface_gpe_exit`, `module init surface_gpe_init`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.