drivers/hwmon/corsair-psu.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/corsair-psu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/corsair-psu.c- Extension
.c- Size
- 24627 bytes
- Lines
- 916
- 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.
- 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/completion.hlinux/debugfs.hlinux/errno.hlinux/hid.hlinux/hwmon.hlinux/jiffies.hlinux/kernel.hlinux/module.hlinux/slab.hlinux/types.h
Detected Declarations
struct corsairpsu_datafunction corsairpsu_linear11_to_intfunction corsairpsu_dutycycle_to_pwmfunction corsairpsu_usb_cmdfunction corsairpsu_initfunction corsairpsu_fwinfofunction corsairpsu_requestfunction corsairpsu_get_valuefunction corsairpsu_get_criticalsfunction corsairpsu_check_cmd_supportfunction corsairpsu_hwmon_temp_is_visiblefunction corsairpsu_hwmon_fan_is_visiblefunction corsairpsu_hwmon_pwm_is_visiblefunction corsairpsu_hwmon_power_is_visiblefunction corsairpsu_hwmon_in_is_visiblefunction corsairpsu_hwmon_curr_is_visiblefunction corsairpsu_hwmon_ops_is_visiblefunction corsairpsu_hwmon_temp_readfunction corsairpsu_hwmon_pwm_readfunction corsairpsu_hwmon_power_readfunction corsairpsu_hwmon_in_readfunction corsairpsu_hwmon_curr_readfunction corsairpsu_hwmon_ops_readfunction corsairpsu_hwmon_ops_read_stringfunction print_uptimefunction uptime_showfunction uptime_total_showfunction vendor_showfunction product_showfunction ocpmode_showfunction corsairpsu_debugfs_initfunction corsairpsu_debugfs_initfunction corsairpsu_removefunction corsairpsu_raw_eventfunction corsairpsu_resumefunction corsair_initfunction corsair_exit
Annotated Snippet
* With module_init() the driver would load before the HID bus when
* built-in, so use late_initcall() instead.
*/
late_initcall(corsair_init);
module_exit(corsair_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Wilken Gottwalt <wilken.gottwalt@posteo.net>");
MODULE_DESCRIPTION("Linux driver for Corsair power supplies with HID sensors interface");
Annotation
- Immediate include surface: `linux/completion.h`, `linux/debugfs.h`, `linux/errno.h`, `linux/hid.h`, `linux/hwmon.h`, `linux/jiffies.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct corsairpsu_data`, `function corsairpsu_linear11_to_int`, `function corsairpsu_dutycycle_to_pwm`, `function corsairpsu_usb_cmd`, `function corsairpsu_init`, `function corsairpsu_fwinfo`, `function corsairpsu_request`, `function corsairpsu_get_value`, `function corsairpsu_get_criticals`, `function corsairpsu_check_cmd_support`.
- Atlas domain: Driver Families / drivers/hwmon.
- Implementation status: integration implementation candidate.
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.