drivers/hwmon/intel-m10-bmc-hwmon.c
Source file repositories/reference/linux-study-clean/drivers/hwmon/intel-m10-bmc-hwmon.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwmon/intel-m10-bmc-hwmon.c- Extension
.c- Size
- 29048 bytes
- Lines
- 791
- 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/device.hlinux/hwmon.hlinux/mfd/intel-m10-bmc.hlinux/module.hlinux/mod_devicetable.hlinux/platform_device.h
Detected Declarations
struct m10bmc_sdatastruct m10bmc_hwmon_board_datastruct m10bmc_hwmonfunction find_sensor_datafunction do_sensor_readfunction m10bmc_hwmon_readfunction m10bmc_hwmon_read_stringfunction m10bmc_hwmon_probe
Annotated Snippet
struct m10bmc_sdata {
unsigned int reg_input;
unsigned int reg_max;
unsigned int reg_crit;
unsigned int reg_hyst;
unsigned int reg_min;
unsigned int multiplier;
const char *label;
};
struct m10bmc_hwmon_board_data {
const struct m10bmc_sdata *tables[hwmon_max];
const struct hwmon_channel_info * const *hinfo;
};
struct m10bmc_hwmon {
struct device *dev;
struct hwmon_chip_info chip;
char *hw_name;
struct intel_m10bmc *m10bmc;
const struct m10bmc_hwmon_board_data *bdata;
};
static const struct m10bmc_sdata n3000bmc_temp_tbl[] = {
{ 0x100, 0x104, 0x108, 0x10c, 0x0, 500, "Board Temperature" },
{ 0x110, 0x114, 0x118, 0x0, 0x0, 500, "FPGA Die Temperature" },
{ 0x11c, 0x124, 0x120, 0x0, 0x0, 500, "QSFP0 Temperature" },
{ 0x12c, 0x134, 0x130, 0x0, 0x0, 500, "QSFP1 Temperature" },
{ 0x168, 0x0, 0x0, 0x0, 0x0, 500, "Retimer A Temperature" },
{ 0x16c, 0x0, 0x0, 0x0, 0x0, 500, "Retimer A SerDes Temperature" },
{ 0x170, 0x0, 0x0, 0x0, 0x0, 500, "Retimer B Temperature" },
{ 0x174, 0x0, 0x0, 0x0, 0x0, 500, "Retimer B SerDes Temperature" },
};
static const struct m10bmc_sdata n3000bmc_in_tbl[] = {
{ 0x128, 0x0, 0x0, 0x0, 0x0, 1, "QSFP0 Supply Voltage" },
{ 0x138, 0x0, 0x0, 0x0, 0x0, 1, "QSFP1 Supply Voltage" },
{ 0x13c, 0x0, 0x0, 0x0, 0x0, 1, "FPGA Core Voltage" },
{ 0x144, 0x0, 0x0, 0x0, 0x0, 1, "12V Backplane Voltage" },
{ 0x14c, 0x0, 0x0, 0x0, 0x0, 1, "1.2V Voltage" },
{ 0x150, 0x0, 0x0, 0x0, 0x0, 1, "12V AUX Voltage" },
{ 0x158, 0x0, 0x0, 0x0, 0x0, 1, "1.8V Voltage" },
{ 0x15c, 0x0, 0x0, 0x0, 0x0, 1, "3.3V Voltage" },
};
static const struct m10bmc_sdata n3000bmc_curr_tbl[] = {
{ 0x140, 0x0, 0x0, 0x0, 0x0, 1, "FPGA Core Current" },
{ 0x148, 0x0, 0x0, 0x0, 0x0, 1, "12V Backplane Current" },
{ 0x154, 0x0, 0x0, 0x0, 0x0, 1, "12V AUX Current" },
};
static const struct m10bmc_sdata n3000bmc_power_tbl[] = {
{ 0x160, 0x0, 0x0, 0x0, 0x0, 1000, "Board Power" },
};
static const struct hwmon_channel_info * const n3000bmc_hinfo[] = {
HWMON_CHANNEL_INFO(temp,
HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST |
HWMON_T_CRIT | HWMON_T_CRIT_HYST | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT |
HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT |
HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT |
HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL,
HWMON_T_INPUT | HWMON_T_LABEL),
HWMON_CHANNEL_INFO(in,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL,
HWMON_I_INPUT | HWMON_I_LABEL),
HWMON_CHANNEL_INFO(curr,
HWMON_C_INPUT | HWMON_C_LABEL,
HWMON_C_INPUT | HWMON_C_LABEL,
HWMON_C_INPUT | HWMON_C_LABEL),
HWMON_CHANNEL_INFO(power,
HWMON_P_INPUT | HWMON_P_LABEL),
NULL
};
static const struct m10bmc_sdata d5005bmc_temp_tbl[] = {
{ 0x100, 0x104, 0x108, 0x10c, 0x0, 500, "Board Inlet Air Temperature" },
{ 0x110, 0x114, 0x118, 0x0, 0x0, 500, "FPGA Core Temperature" },
Annotation
- Immediate include surface: `linux/device.h`, `linux/hwmon.h`, `linux/mfd/intel-m10-bmc.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/platform_device.h`.
- Detected declarations: `struct m10bmc_sdata`, `struct m10bmc_hwmon_board_data`, `struct m10bmc_hwmon`, `function find_sensor_data`, `function do_sensor_read`, `function m10bmc_hwmon_read`, `function m10bmc_hwmon_read_string`, `function m10bmc_hwmon_probe`.
- 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.