arch/arm/mach-mvebu/pm-board.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-mvebu/pm-board.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-mvebu/pm-board.c- Extension
.c- Size
- 3312 bytes
- Lines
- 145
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/err.hlinux/gpio/consumer.hlinux/init.hlinux/io.hlinux/of.hlinux/of_address.hlinux/slab.hcommon.h
Detected Declarations
function mvebu_armada_pm_enterfunction mvebu_armada_pm_init
Annotated Snippet
if (!name) {
ret = -ENOMEM;
goto out;
}
pic_gpios[i] = fwnode_gpiod_get_index(of_fwnode_handle(np),
"ctrl", i, GPIOD_OUT_HIGH,
name);
ret = PTR_ERR_OR_ZERO(pic_gpios[i]);
if (ret) {
kfree(name);
goto out;
}
ret = of_parse_phandle_with_fixed_args(np, "ctrl-gpios", 2,
i, &args);
if (ret < 0) {
gpiod_put(pic_gpios[i]);
kfree(name);
goto out;
}
if (gpio_ctrl_np)
of_node_put(gpio_ctrl_np);
gpio_ctrl_np = args.np;
pic_raw_gpios[i] = args.args[0];
}
gpio_ctrl = of_iomap(gpio_ctrl_np, 0);
if (!gpio_ctrl) {
ret = -ENOMEM;
goto out;
}
mvebu_pm_suspend_init(mvebu_armada_pm_enter);
out:
of_node_put(np);
of_node_put(gpio_ctrl_np);
return ret;
}
/*
* Registering the mvebu_board_pm_enter callback must be done before
* the platform_suspend_ops will be registered. In the same time we
* also need to have the gpio devices registered. That's why we use a
* device_initcall_sync which is called after all the device_initcall
* (used by the gpio device) but before the late_initcall (used to
* register the platform_suspend_ops)
*/
device_initcall_sync(mvebu_armada_pm_init);
Annotation
- Immediate include surface: `linux/delay.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/init.h`, `linux/io.h`, `linux/of.h`, `linux/of_address.h`, `linux/slab.h`.
- Detected declarations: `function mvebu_armada_pm_enter`, `function mvebu_armada_pm_init`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.