drivers/platform/x86/intel_scu_ipcutil.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel_scu_ipcutil.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel_scu_ipcutil.c- Extension
.c- Size
- 3475 bytes
- Lines
- 153
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/fcntl.hlinux/fs.hlinux/kernel.hlinux/module.hlinux/sched.hlinux/slab.hlinux/types.hlinux/uaccess.hlinux/platform_data/x86/intel_scu_ipc.h
Detected Declarations
struct scu_ipc_datafunction scu_reg_accessfunction scu_ipc_ioctlfunction scu_ipc_openfunction scu_ipc_releasefunction ipc_module_initfunction ipc_module_exitmodule init ipc_module_init
Annotated Snippet
static const struct file_operations scu_ipc_fops = {
.unlocked_ioctl = scu_ipc_ioctl,
.open = scu_ipc_open,
.release = scu_ipc_release,
};
static int __init ipc_module_init(void)
{
major = register_chrdev(0, "intel_mid_scu", &scu_ipc_fops);
if (major < 0)
return major;
return 0;
}
static void __exit ipc_module_exit(void)
{
unregister_chrdev(major, "intel_mid_scu");
}
module_init(ipc_module_init);
module_exit(ipc_module_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Utility driver for intel scu ipc");
MODULE_AUTHOR("Sreedhara <sreedhara.ds@intel.com>");
Annotation
- Immediate include surface: `linux/errno.h`, `linux/fcntl.h`, `linux/fs.h`, `linux/kernel.h`, `linux/module.h`, `linux/sched.h`, `linux/slab.h`, `linux/types.h`.
- Detected declarations: `struct scu_ipc_data`, `function scu_reg_access`, `function scu_ipc_ioctl`, `function scu_ipc_open`, `function scu_ipc_release`, `function ipc_module_init`, `function ipc_module_exit`, `module init ipc_module_init`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.