drivers/platform/mellanox/mlx-platform.c
Source file repositories/reference/linux-study-clean/drivers/platform/mellanox/mlx-platform.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/mellanox/mlx-platform.c- Extension
.c- Size
- 244425 bytes
- Lines
- 8662
- Domain
- Driver Families
- Bucket
- drivers/platform
- 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/array_size.hlinux/bits.hlinux/device.hlinux/dmi.hlinux/i2c.hlinux/i2c-mux.hlinux/io.hlinux/module.hlinux/pci.hlinux/platform_device.hlinux/platform_data/i2c-mux-reg.hlinux/platform_data/mlxreg.hlinux/reboot.hlinux/regmap.h
Detected Declarations
struct mlxplat_privstruct mlxplat_mlxcpld_regmap_contextfunction mlxplat_mlxcpld_l1_switch_pwr_events_handlerfunction mlxplat_mlxcpld_l1_switch_intrusion_events_handlerfunction mlxplat_mlxcpld_writeable_regfunction mlxplat_mlxcpld_readable_regfunction mlxplat_mlxcpld_volatile_regfunction mlxplat_mlxcpld_reg_readfunction mlxplat_mlxcpld_reg_writefunction mlxplat_reboot_notifierfunction mlxplat_powerofffunction mlxplat_register_platform_devicefunction mlxplat_dmi_default_matchedfunction mlxplat_dmi_default_wc_matchedfunction mlxplat_dmi_default_eth_wc_blade_matchedfunction mlxplat_dmi_msn21xx_matchedfunction mlxplat_dmi_msn274x_matchedfunction mlxplat_dmi_msn201x_matchedfunction mlxplat_dmi_qmb7xx_matchedfunction mlxplat_dmi_comex_matchedfunction mlxplat_dmi_ng400_matchedfunction mlxplat_dmi_ng400_dgx_matchedfunction mlxplat_dmi_modular_matchedfunction mlxplat_dmi_chassis_blade_matchedfunction mlxplat_dmi_rack_switch_matchedfunction mlxplat_dmi_ng800_matchedfunction mlxplat_dmi_ng800_dgx_matchedfunction mlxplat_dmi_l1_switch_matchedfunction mlxplat_dmi_smart_switch_matchedfunction mlxplat_dmi_ng400_hi171_matchedfunction mlxplat_mlxcpld_verify_bus_topologyfunction mlxplat_mlxcpld_check_wd_capabilityfunction mlxplat_lpc_cpld_device_initfunction mlxplat_lpc_cpld_device_exitfunction mlxplat_pci_fpga_device_exitfunction mlxplat_pci_fpga_devices_initfunction mlxplat_pci_fpga_devices_exitfunction mlxplat_logicdev_initfunction mlxplat_logicdev_exitfunction mlxplat_platdevs_initfunction mlxplat_platdevs_exitfunction mlxplat_i2c_mux_complition_notifyfunction mlxplat_i2c_mux_topology_initfunction mlxplat_i2c_mux_topology_exitfunction mlxplat_i2c_main_completion_notifyfunction mlxplat_i2c_main_initfunction mlxplat_i2c_main_exitfunction mlxplat_probe
Annotated Snippet
module_init(mlxplat_init);
static void __exit mlxplat_exit(void)
{
if (mlxplat_dev)
platform_device_unregister(mlxplat_dev);
platform_driver_unregister(&mlxplat_driver);
}
module_exit(mlxplat_exit);
MODULE_AUTHOR("Vadim Pasternak <vadimp@mellanox.com>");
MODULE_DESCRIPTION("Mellanox platform driver");
MODULE_LICENSE("Dual BSD/GPL");
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bits.h`, `linux/device.h`, `linux/dmi.h`, `linux/i2c.h`, `linux/i2c-mux.h`, `linux/io.h`, `linux/module.h`.
- Detected declarations: `struct mlxplat_priv`, `struct mlxplat_mlxcpld_regmap_context`, `function mlxplat_mlxcpld_l1_switch_pwr_events_handler`, `function mlxplat_mlxcpld_l1_switch_intrusion_events_handler`, `function mlxplat_mlxcpld_writeable_reg`, `function mlxplat_mlxcpld_readable_reg`, `function mlxplat_mlxcpld_volatile_reg`, `function mlxplat_mlxcpld_reg_read`, `function mlxplat_mlxcpld_reg_write`, `function mlxplat_reboot_notifier`.
- Atlas domain: Driver Families / drivers/platform.
- 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.