drivers/hwmon/via686a.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/via686a.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/via686a.c- Extension
.c- Size
- 31015 bytes
- Lines
- 944
- 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.
- 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/module.hlinux/slab.hlinux/pci.hlinux/jiffies.hlinux/platform_device.hlinux/hwmon.hlinux/hwmon-sysfs.hlinux/err.hlinux/init.hlinux/mutex.hlinux/sysfs.hlinux/acpi.hlinux/io.h
Detected Declarations
struct via686a_datafunction IN_TO_REGfunction IN_FROM_REGfunction FAN_TO_REGfunction tofunction TEMP_FROM_REG10function via686a_read_valuefunction via686a_write_valuefunction via686a_update_fan_divfunction in_showfunction in_min_showfunction in_max_showfunction in_min_storefunction in_max_storefunction temp_showfunction temp_over_showfunction temp_hyst_showfunction temp_over_storefunction temp_hyst_storefunction fan_showfunction fan_min_showfunction fan_div_showfunction fan_min_storefunction fan_div_storefunction alarms_showfunction alarm_showfunction name_showfunction via686a_init_devicefunction via686a_probefunction via686a_removefunction via686a_device_addfunction via686a_pci_probefunction sm_via686a_initfunction sm_via686a_exitmodule init sm_via686a_init
Annotated Snippet
static struct pci_driver via686a_pci_driver = {
.name = DRIVER_NAME,
.id_table = via686a_pci_ids,
.probe = via686a_pci_probe,
};
static int __init sm_via686a_init(void)
{
return pci_register_driver(&via686a_pci_driver);
}
static void __exit sm_via686a_exit(void)
{
pci_unregister_driver(&via686a_pci_driver);
if (s_bridge != NULL) {
platform_device_unregister(pdev);
platform_driver_unregister(&via686a_driver);
pci_dev_put(s_bridge);
s_bridge = NULL;
}
}
MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>, "
"Mark Studebaker <mdsxyz123@yahoo.com> "
"and Bob Dougherty <bobd@stanford.edu>");
MODULE_DESCRIPTION("VIA 686A Sensor device");
MODULE_LICENSE("GPL");
module_init(sm_via686a_init);
module_exit(sm_via686a_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/pci.h`, `linux/jiffies.h`, `linux/platform_device.h`, `linux/hwmon.h`, `linux/hwmon-sysfs.h`, `linux/err.h`.
- Detected declarations: `struct via686a_data`, `function IN_TO_REG`, `function IN_FROM_REG`, `function FAN_TO_REG`, `function to`, `function TEMP_FROM_REG10`, `function via686a_read_value`, `function via686a_write_value`, `function via686a_update_fan_div`, `function in_show`.
- Atlas domain: Driver Families / drivers/hwmon.
- Implementation status: pattern implementation candidate.
- 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.