drivers/input/misc/hisi_powerkey.c
Source file repositories/reference/linux-study-clean/drivers/input/misc/hisi_powerkey.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/input/misc/hisi_powerkey.c- Extension
.c- Size
- 3249 bytes
- Lines
- 130
- Domain
- Driver Families
- Bucket
- drivers/input
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/platform_device.hlinux/interrupt.hlinux/reboot.hlinux/kernel.hlinux/module.hlinux/of_irq.hlinux/input.hlinux/slab.h
Detected Declarations
function hi65xx_power_press_isrfunction hi65xx_power_release_isrfunction hi65xx_restart_toggle_isrfunction hi65xx_powerkey_probe
Annotated Snippet
if (error < 0) {
dev_err(dev, "couldn't request irq %s: %d\n",
hi65xx_irq_info[i].name, error);
return error;
}
}
error = input_register_device(input);
if (error) {
dev_err(dev, "failed to register input device: %d\n", error);
return error;
}
device_init_wakeup(dev, 1);
return 0;
}
static struct platform_driver hi65xx_powerkey_driver = {
.driver = {
.name = "hi65xx-powerkey",
},
.probe = hi65xx_powerkey_probe,
};
module_platform_driver(hi65xx_powerkey_driver);
MODULE_AUTHOR("Zhiliang Xue <xuezhiliang@huawei.com");
MODULE_DESCRIPTION("Hisi PMIC Power key driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/interrupt.h`, `linux/reboot.h`, `linux/kernel.h`, `linux/module.h`, `linux/of_irq.h`, `linux/input.h`, `linux/slab.h`.
- Detected declarations: `function hi65xx_power_press_isr`, `function hi65xx_power_release_isr`, `function hi65xx_restart_toggle_isr`, `function hi65xx_powerkey_probe`.
- Atlas domain: Driver Families / drivers/input.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.