drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c
Source file repositories/reference/linux-study-clean/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c- Extension
.c- Size
- 15396 bytes
- Lines
- 592
- Domain
- Driver Families
- Bucket
- drivers/thermal
- 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.
- 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/init.hlinux/export.hlinux/module.hlinux/device.hlinux/platform_device.hlinux/io.hlinux/acpi.hlinux/uaccess.hlinux/miscdevice.hlinux/fs.hacpi_thermal_rel.h
Detected Declarations
function acpi_thermal_rel_openfunction acpi_thermal_rel_releasefunction acpi_parse_trtfunction acpi_parse_artfunction acpi_parse_psvtfunction get_single_namefunction fill_artfunction fill_trtfunction fill_psvtfunction acpi_thermal_rel_ioctlfunction acpi_thermal_rel_misc_device_addfunction acpi_thermal_rel_misc_device_removeexport acpi_parse_trtexport acpi_parse_artexport acpi_thermal_rel_misc_device_addexport acpi_thermal_rel_misc_device_remove
Annotated Snippet
static const struct file_operations acpi_thermal_rel_fops = {
.owner = THIS_MODULE,
.open = acpi_thermal_rel_open,
.release = acpi_thermal_rel_release,
.unlocked_ioctl = acpi_thermal_rel_ioctl,
};
static struct miscdevice acpi_thermal_rel_misc_device = {
.minor = MISC_DYNAMIC_MINOR,
"acpi_thermal_rel",
&acpi_thermal_rel_fops
};
int acpi_thermal_rel_misc_device_add(acpi_handle handle)
{
acpi_thermal_rel_handle = handle;
return misc_register(&acpi_thermal_rel_misc_device);
}
EXPORT_SYMBOL(acpi_thermal_rel_misc_device_add);
int acpi_thermal_rel_misc_device_remove(acpi_handle handle)
{
misc_deregister(&acpi_thermal_rel_misc_device);
return 0;
}
EXPORT_SYMBOL(acpi_thermal_rel_misc_device_remove);
MODULE_AUTHOR("Zhang Rui <rui.zhang@intel.com>");
MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@intel.com");
MODULE_DESCRIPTION("Intel acpi thermal rel misc dev driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/init.h`, `linux/export.h`, `linux/module.h`, `linux/device.h`, `linux/platform_device.h`, `linux/io.h`, `linux/acpi.h`, `linux/uaccess.h`.
- Detected declarations: `function acpi_thermal_rel_open`, `function acpi_thermal_rel_release`, `function acpi_parse_trt`, `function acpi_parse_art`, `function acpi_parse_psvt`, `function get_single_name`, `function fill_art`, `function fill_trt`, `function fill_psvt`, `function acpi_thermal_rel_ioctl`.
- Atlas domain: Driver Families / drivers/thermal.
- 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.