drivers/w1/slaves/w1_therm.c
Source file repositories/reference/linux-study-clean/drivers/w1/slaves/w1_therm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/w1/slaves/w1_therm.c- Extension
.c- Size
- 57756 bytes
- Lines
- 2192
- Domain
- Driver Families
- Bucket
- drivers/w1
- 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
asm/types.hlinux/kernel.hlinux/module.hlinux/moduleparam.hlinux/sched.hlinux/device.hlinux/types.hlinux/slab.hlinux/delay.hlinux/hwmon.hlinux/string.hlinux/jiffies.hlinux/w1.h
Detected Declarations
struct w1_therm_family_converterstruct w1_therm_family_datastruct therm_infofunction w1_is_visiblefunction w1_readfunction w1_DS18B20_convert_timefunction w1_DS18S20_convert_timefunction w1_DS1825_convert_timefunction w1_DS18B20_write_datafunction w1_DS18S20_write_datafunction w1_DS18B20_set_resolutionfunction w1_DS18B20_get_resolutionfunction w1_DS18B20_convert_tempfunction w1_DS18S20_convert_tempfunction w1_DS1825_convert_tempfunction device_familyfunction bus_mutex_lockfunction check_family_datafunction bulk_read_supportfunction conversion_timefunction temperature_from_RAMfunction int_to_shortfunction w1_therm_add_slavefunction w1_therm_remove_slavefunction reset_select_slavefunction w1_poll_completionfunction convert_tfunction conv_time_measurefunction read_scratchpadfunction write_scratchpadfunction copy_scratchpadfunction recall_eepromfunction read_powermodefunction trigger_bulk_readfunction list_for_each_entryfunction w1_slave_showfunction w1_slave_storefunction temperature_showfunction ext_power_showfunction resolution_showfunction resolution_storefunction eeprom_cmd_storefunction alarms_showfunction alarms_storefunction therm_bulk_read_storefunction therm_bulk_read_showfunction list_for_each_entryfunction conv_time_show
Annotated Snippet
module_init(w1_therm_init);
module_exit(w1_therm_fini);
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, temperature family.");
MODULE_LICENSE("GPL");
MODULE_ALIAS("w1-family-" __stringify(W1_THERM_DS18S20));
MODULE_ALIAS("w1-family-" __stringify(W1_THERM_DS1822));
MODULE_ALIAS("w1-family-" __stringify(W1_THERM_DS18B20));
MODULE_ALIAS("w1-family-" __stringify(W1_THERM_DS1825));
MODULE_ALIAS("w1-family-" __stringify(W1_THERM_DS28EA00));
Annotation
- Immediate include surface: `asm/types.h`, `linux/kernel.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/sched.h`, `linux/device.h`, `linux/types.h`, `linux/slab.h`.
- Detected declarations: `struct w1_therm_family_converter`, `struct w1_therm_family_data`, `struct therm_info`, `function w1_is_visible`, `function w1_read`, `function w1_DS18B20_convert_time`, `function w1_DS18S20_convert_time`, `function w1_DS1825_convert_time`, `function w1_DS18B20_write_data`, `function w1_DS18S20_write_data`.
- Atlas domain: Driver Families / drivers/w1.
- 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.