drivers/hwmon/k10temp.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/k10temp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/k10temp.c- Extension
.c- Size
- 16167 bytes
- Lines
- 586
- Domain
- Driver Families
- Bucket
- drivers/hwmon
- 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.
- 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/bitops.hlinux/err.hlinux/hwmon.hlinux/init.hlinux/module.hlinux/pci.hlinux/pci_ids.hasm/amd/node.hasm/cpuid/api.hasm/processor.h
Detected Declarations
struct k10temp_datastruct tctl_offsetfunction read_htcreg_pcifunction read_tempreg_pcifunction amd_nb_index_readfunction read_htcreg_nb_f15function read_tempreg_nb_f15function amd_pci_dev_to_node_idfunction read_tempreg_nb_zenfunction read_ccd_temp_regfunction get_raw_tempfunction k10temp_read_labelsfunction k10temp_read_tempfunction k10temp_readfunction k10temp_is_visiblefunction has_erratum_319function k10temp_get_ccd_supportfunction k10temp_probe
Annotated Snippet
static struct pci_driver k10temp_driver = {
.name = "k10temp",
.id_table = k10temp_id_table,
.probe = k10temp_probe,
};
module_pci_driver(k10temp_driver);
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/err.h`, `linux/hwmon.h`, `linux/init.h`, `linux/module.h`, `linux/pci.h`, `linux/pci_ids.h`, `asm/amd/node.h`.
- Detected declarations: `struct k10temp_data`, `struct tctl_offset`, `function read_htcreg_pci`, `function read_tempreg_pci`, `function amd_nb_index_read`, `function read_htcreg_nb_f15`, `function read_tempreg_nb_f15`, `function amd_pci_dev_to_node_id`, `function read_tempreg_nb_zen`, `function read_ccd_temp_reg`.
- Atlas domain: Driver Families / drivers/hwmon.
- Implementation status: pattern 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.