drivers/hwmon/aquacomputer_d5next.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/aquacomputer_d5next.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/aquacomputer_d5next.c- Extension
.c- Size
- 55151 bytes
- Lines
- 1924
- Domain
- Driver Families
- Bucket
- drivers/hwmon
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/crc16.hlinux/debugfs.hlinux/delay.hlinux/hid.hlinux/hwmon.hlinux/jiffies.hlinux/ktime.hlinux/module.hlinux/seq_file.hlinux/unaligned.h
Detected Declarations
struct aqc_fan_structure_offsetsstruct aqc_dataenum kindsfunction aqc_percent_to_pwmfunction aqc_pwm_to_percentfunction aqc_aquastreamxt_convert_pump_rpmfunction aqc_aquastreamxt_convert_fan_rpmfunction aqc_delay_ctrl_reportfunction aqc_get_ctrl_datafunction aqc_send_ctrl_datafunction aqc_get_ctrl_valfunction aqc_set_ctrl_valsfunction aqc_set_ctrl_valfunction aqc_is_visiblefunction aqc_legacy_readfunction aqc_readfunction aqc_read_stringfunction aqc_writefunction aqc_raw_eventfunction serial_number_showfunction firmware_version_showfunction power_cycles_showfunction aqc_debugfs_initfunction aqc_probefunction aqc_removefunction aqc_initfunction aqc_exit
Annotated Snippet
struct aqc_fan_structure_offsets {
u8 voltage;
u8 curr;
u8 power;
u8 speed;
};
/* Fan structure offsets for Aquaero */
static struct aqc_fan_structure_offsets aqc_aquaero_fan_structure = {
.voltage = AQUAERO_FAN_VOLTAGE_OFFSET,
.curr = AQUAERO_FAN_CURRENT_OFFSET,
.power = AQUAERO_FAN_POWER_OFFSET,
.speed = AQUAERO_FAN_SPEED_OFFSET
};
/* Fan structure offsets for Aquastream Ultimate */
static struct aqc_fan_structure_offsets aqc_aquastreamult_fan_structure = {
.voltage = AQUASTREAMULT_FAN_VOLTAGE_OFFSET,
.curr = AQUASTREAMULT_FAN_CURRENT_OFFSET,
.power = AQUASTREAMULT_FAN_POWER_OFFSET,
.speed = AQUASTREAMULT_FAN_SPEED_OFFSET
};
/* Fan structure offsets for all devices except those above */
static struct aqc_fan_structure_offsets aqc_general_fan_structure = {
.voltage = AQC_FAN_VOLTAGE_OFFSET,
.curr = AQC_FAN_CURRENT_OFFSET,
.power = AQC_FAN_POWER_OFFSET,
.speed = AQC_FAN_SPEED_OFFSET
};
struct aqc_data {
struct hid_device *hdev;
struct device *hwmon_dev;
struct dentry *debugfs;
enum kinds kind;
const char *name;
int status_report_id; /* Used for legacy devices, report is stored in buffer */
int ctrl_report_id;
int secondary_ctrl_report_id;
int secondary_ctrl_report_size;
u8 *secondary_ctrl_report;
ktime_t last_ctrl_report_op;
int ctrl_report_delay; /* Delay between two ctrl report operations, in ms */
int buffer_size;
u8 *buffer;
int checksum_start;
int checksum_length;
int checksum_offset;
int num_fans;
u16 *fan_sensor_offsets;
u16 *fan_ctrl_offsets;
int num_temp_sensors;
int temp_sensor_start_offset;
int num_virtual_temp_sensors;
int virtual_temp_sensor_start_offset;
int num_calc_virt_temp_sensors;
int calc_virt_temp_sensor_start_offset;
u16 temp_ctrl_offset;
u16 power_cycle_count_offset;
int num_flow_sensors;
u8 flow_sensors_start_offset;
u8 flow_pulses_ctrl_offset;
struct aqc_fan_structure_offsets *fan_structure;
/* General info, same across all devices */
u8 serial_number_start_offset;
u32 serial_number[2];
u8 firmware_version_offset;
u16 firmware_version;
/* How many times the device was powered on, if available */
u32 power_cycles;
/* Sensor values */
s32 temp_input[20]; /* Max 4 physical and 16 virtual or 8 physical and 12 virtual */
s32 speed_input[9];
u32 speed_input_min[1];
u32 speed_input_target[1];
u32 speed_input_max[1];
u32 power_input[8];
u16 voltage_input[8];
u16 current_input[8];
/* Label values */
const char *const *temp_label;
Annotation
- Immediate include surface: `linux/crc16.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/hid.h`, `linux/hwmon.h`, `linux/jiffies.h`, `linux/ktime.h`, `linux/module.h`.
- Detected declarations: `struct aqc_fan_structure_offsets`, `struct aqc_data`, `enum kinds`, `function aqc_percent_to_pwm`, `function aqc_pwm_to_percent`, `function aqc_aquastreamxt_convert_pump_rpm`, `function aqc_aquastreamxt_convert_fan_rpm`, `function aqc_delay_ctrl_report`, `function aqc_get_ctrl_data`, `function aqc_send_ctrl_data`.
- Atlas domain: Driver Families / drivers/hwmon.
- Implementation status: source 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.