drivers/hwmon/applesmc.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/applesmc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/applesmc.c- Extension
.c- Size
- 33745 bytes
- Lines
- 1420
- 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/delay.hlinux/platform_device.hlinux/input.hlinux/kernel.hlinux/slab.hlinux/module.hlinux/timer.hlinux/dmi.hlinux/mutex.hlinux/hwmon-sysfs.hlinux/io.hlinux/leds.hlinux/hwmon.hlinux/workqueue.hlinux/err.hlinux/bits.h
Detected Declarations
struct applesmc_dev_attrstruct applesmc_node_groupstruct applesmc_entryfunction wait_statusfunction send_bytefunction send_commandfunction smc_sanefunction send_argumentfunction read_smcfunction write_smcfunction read_register_countfunction applesmc_read_entryfunction applesmc_write_entryfunction applesmc_get_lower_boundfunction applesmc_get_upper_boundfunction applesmc_read_keyfunction applesmc_write_keyfunction applesmc_has_keyfunction applesmc_read_s16function applesmc_device_initfunction applesmc_init_indexfunction applesmc_init_smcreg_tryfunction applesmc_destroy_smcregfunction applesmc_init_smcregfunction applesmc_probefunction applesmc_pm_resumefunction applesmc_pm_restorefunction applesmc_calibratefunction applesmc_idev_pollfunction applesmc_name_showfunction applesmc_position_showfunction applesmc_light_showfunction applesmc_show_sensor_labelfunction applesmc_show_temperaturefunction applesmc_show_fan_speedfunction applesmc_store_fan_speedfunction applesmc_show_fan_manualfunction applesmc_store_fan_manualfunction applesmc_show_fan_positionfunction applesmc_calibrate_showfunction applesmc_calibrate_storefunction applesmc_backlight_setfunction applesmc_brightness_setfunction applesmc_key_count_showfunction applesmc_key_at_index_read_showfunction applesmc_key_at_index_data_length_showfunction applesmc_key_at_index_type_showfunction applesmc_key_at_index_name_show
Annotated Snippet
module_init(applesmc_init);
module_exit(applesmc_exit);
MODULE_AUTHOR("Nicolas Boichat");
MODULE_DESCRIPTION("Apple SMC");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/delay.h`, `linux/platform_device.h`, `linux/input.h`, `linux/kernel.h`, `linux/slab.h`, `linux/module.h`, `linux/timer.h`, `linux/dmi.h`.
- Detected declarations: `struct applesmc_dev_attr`, `struct applesmc_node_group`, `struct applesmc_entry`, `function wait_status`, `function send_byte`, `function send_command`, `function smc_sane`, `function send_argument`, `function read_smc`, `function write_smc`.
- 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.