drivers/hwmon/lm78.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/lm78.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/lm78.c- Extension
.c- Size
- 27469 bytes
- Lines
- 1033
- Domain
- Driver Families
- Bucket
- drivers/hwmon
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/init.hlinux/slab.hlinux/jiffies.hlinux/i2c.hlinux/hwmon.hlinux/hwmon-vid.hlinux/hwmon-sysfs.hlinux/err.hlinux/mutex.hlinux/platform_device.hlinux/ioport.hlinux/io.h
Detected Declarations
struct lm78_dataenum chipsfunction IN_TO_REGfunction FAN_TO_REGfunction FAN_FROM_REGfunction TEMP_TO_REGfunction TEMP_FROM_REGfunction 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 cpu0_vid_showfunction alarms_showfunction alarm_showfunction lm78_alias_detectfunction lm78_alias_detectfunction lm78_i2c_detectfunction lm78_i2c_probefunction lm78_read_valuefunction lm78_write_valuefunction lm78_init_devicefunction lm78_isa_probefunction lm78_isa_foundfunction lm78_isa_device_addfunction lm78_isa_registerfunction lm78_isa_unregisterfunction lm78_isa_registerfunction lm78_isa_unregisterfunction sm_lm78_exitmodule init sm_lm78_init
Annotated Snippet
module_init(sm_lm78_init);
module_exit(sm_lm78_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/slab.h`, `linux/jiffies.h`, `linux/i2c.h`, `linux/hwmon.h`, `linux/hwmon-vid.h`, `linux/hwmon-sysfs.h`.
- Detected declarations: `struct lm78_data`, `enum chips`, `function IN_TO_REG`, `function FAN_TO_REG`, `function FAN_FROM_REG`, `function TEMP_TO_REG`, `function TEMP_FROM_REG`, `function in_show`, `function in_min_show`, `function in_max_show`.
- Atlas domain: Driver Families / drivers/hwmon.
- Implementation status: integration 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.