drivers/hwmon/acpi_power_meter.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/acpi_power_meter.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/acpi_power_meter.c- Extension
.c- Size
- 25659 bytes
- Lines
- 1051
- 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/hwmon.hlinux/hwmon-sysfs.hlinux/jiffies.hlinux/mutex.hlinux/dmi.hlinux/slab.hlinux/kdev_t.hlinux/sched.hlinux/time.hlinux/err.hlinux/acpi.hlinux/platform_device.h
Detected Declarations
struct acpi_power_meter_capabilitiesstruct acpi_power_meter_resourcefunction can_cap_in_hardwarefunction update_avg_intervalfunction update_capfunction set_acpi_tripfunction update_meterfunction remove_domain_devicesfunction read_domain_devicesfunction set_tripfunction set_capfunction set_avg_intervalfunction get_power_alarm_statefunction power_meter_is_visiblefunction power_meter_readfunction power_meter_writefunction power1_average_max_storefunction power1_average_min_storefunction power1_average_min_showfunction power1_average_max_showfunction power1_cap_hyst_showfunction power1_accuracy_showfunction power1_is_battery_showfunction power1_model_number_showfunction power1_oem_info_showfunction power1_serial_number_showfunction power_extra_is_visiblefunction free_capabilitiesfunction read_capabilitiesfunction acpi_power_meter_notifyfunction acpi_power_meter_probefunction acpi_power_meter_removefunction acpi_power_meter_resumefunction enable_cap_knobsfunction acpi_power_meter_initfunction acpi_power_meter_exitmodule init acpi_power_meter_init
Annotated Snippet
module_init(acpi_power_meter_init);
module_exit(acpi_power_meter_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/hwmon.h`, `linux/hwmon-sysfs.h`, `linux/jiffies.h`, `linux/mutex.h`, `linux/dmi.h`, `linux/slab.h`, `linux/kdev_t.h`.
- Detected declarations: `struct acpi_power_meter_capabilities`, `struct acpi_power_meter_resource`, `function can_cap_in_hardware`, `function update_avg_interval`, `function update_cap`, `function set_acpi_trip`, `function update_meter`, `function remove_domain_devices`, `function read_domain_devices`, `function set_trip`.
- 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.