drivers/hwmon/sis5595.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/sis5595.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/sis5595.c- Extension
.c- Size
- 24770 bytes
- Lines
- 908
- 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/ioport.hlinux/pci.hlinux/platform_device.hlinux/hwmon.hlinux/hwmon-sysfs.hlinux/err.hlinux/init.hlinux/jiffies.hlinux/mutex.hlinux/sysfs.hlinux/acpi.hlinux/io.h
Detected Declarations
struct sis5595_datafunction SIS5595_REG_INfunction FAN_TO_REGfunction FAN_FROM_REGfunction TEMP_FROM_REGfunction TEMP_TO_REGfunction sis5595_read_valuefunction sis5595_write_valuefunction in_showfunction in_min_showfunction in_max_showfunction in_min_storefunction in_max_storefunction temp1_input_showfunction temp1_max_showfunction temp1_max_storefunction temp1_max_hyst_showfunction temp1_max_hyst_storefunction fan_showfunction fan_min_showfunction fan_min_storefunction fan_div_showfunction fan_div_storefunction alarms_showfunction alarm_showfunction name_showfunction sis5595_init_devicefunction sis5595_probefunction sis5595_removefunction sis5595_device_addfunction sis5595_pci_probefunction sm_sis5595_initfunction sm_sis5595_exitmodule init sm_sis5595_init
Annotated Snippet
static struct pci_driver sis5595_pci_driver = {
.name = DRIVER_NAME,
.id_table = sis5595_pci_ids,
.probe = sis5595_pci_probe,
};
static int __init sm_sis5595_init(void)
{
return pci_register_driver(&sis5595_pci_driver);
}
static void __exit sm_sis5595_exit(void)
{
pci_unregister_driver(&sis5595_pci_driver);
if (s_bridge != NULL) {
platform_device_unregister(pdev);
platform_driver_unregister(&sis5595_driver);
pci_dev_put(s_bridge);
s_bridge = NULL;
}
}
MODULE_AUTHOR("Aurelien Jarno <aurelien@aurel32.net>");
MODULE_DESCRIPTION("SiS 5595 Sensor device");
MODULE_LICENSE("GPL");
module_init(sm_sis5595_init);
module_exit(sm_sis5595_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/ioport.h`, `linux/pci.h`, `linux/platform_device.h`, `linux/hwmon.h`, `linux/hwmon-sysfs.h`, `linux/err.h`.
- Detected declarations: `struct sis5595_data`, `function SIS5595_REG_IN`, `function FAN_TO_REG`, `function FAN_FROM_REG`, `function TEMP_FROM_REG`, `function TEMP_TO_REG`, `function sis5595_read_value`, `function sis5595_write_value`, `function in_show`, `function in_min_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.