drivers/power/reset/reboot-mode.c
Source file repositories/reference/linux-study-clean/drivers/power/reset/reboot-mode.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/power/reset/reboot-mode.c- Extension
.c- Size
- 7821 bytes
- Lines
- 350
- Domain
- Driver Families
- Bucket
- drivers/power
- 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/device.hlinux/err.hlinux/init.hlinux/kernel.hlinux/list.hlinux/module.hlinux/of.hlinux/reboot.hlinux/reboot-mode.hlinux/slab.hlinux/string.h
Detected Declarations
struct mode_infostruct reboot_mode_sysfs_datafunction reboot_mode_release_listfunction list_for_each_entry_safefunction reboot_modes_showfunction get_reboot_mode_magicfunction reboot_mode_notifyfunction reboot_mode_create_devicefunction list_for_each_entryfunction reboot_mode_registerfunction for_each_property_of_nodefunction reboot_mode_match_by_namefunction reboot_mode_unregister_devicefunction reboot_mode_unregisterfunction devm_reboot_mode_releasefunction devm_reboot_mode_registerfunction devm_reboot_mode_matchfunction devm_reboot_mode_unregisterfunction reboot_mode_initfunction reboot_mode_exitmodule init reboot_mode_initexport reboot_mode_registerexport reboot_mode_unregisterexport devm_reboot_mode_registerexport devm_reboot_mode_unregister
Annotated Snippet
subsys_initcall(reboot_mode_init);
module_exit(reboot_mode_exit);
MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
MODULE_DESCRIPTION("System reboot mode core library");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/init.h`, `linux/kernel.h`, `linux/list.h`, `linux/module.h`, `linux/of.h`, `linux/reboot.h`.
- Detected declarations: `struct mode_info`, `struct reboot_mode_sysfs_data`, `function reboot_mode_release_list`, `function list_for_each_entry_safe`, `function reboot_modes_show`, `function get_reboot_mode_magic`, `function reboot_mode_notify`, `function reboot_mode_create_device`, `function list_for_each_entry`, `function reboot_mode_register`.
- Atlas domain: Driver Families / drivers/power.
- 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.