drivers/i2c/busses/i2c-mlxbf.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-mlxbf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-mlxbf.c- Extension
.c- Size
- 73044 bytes
- Lines
- 2448
- Domain
- Driver Families
- Bucket
- drivers/i2c
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/acpi.hlinux/bitfield.hlinux/delay.hlinux/err.hlinux/interrupt.hlinux/i2c.hlinux/io.hlinux/iopoll.hlinux/kernel.hlinux/module.hlinux/mutex.hlinux/of.hlinux/platform_device.hlinux/string.hlinux/string_choices.hlinux/units.h
Detected Declarations
struct mlxbf_i2c_timingsstruct mlxbf_i2c_smbus_operationstruct mlxbf_i2c_smbus_requeststruct mlxbf_i2c_resourcestruct mlxbf_i2c_chip_infostruct mlxbf_i2c_privenum mlxbf_i2c_chip_typeenum mlxbf_i2c_timings_configfunction mlxbf_i2c_smbus_transaction_successfunction mlxbf_i2c_smbus_check_statusfunction mlxbf_i2c_smbus_write_datafunction mlxbf_i2c_smbus_read_datafunction mlxbf_i2c_smbus_enablefunction mlxbf_i2c_smbus_start_transactionfunction mlxbf_i2c_smbus_quick_commandfunction mlxbf_i2c_smbus_byte_funcfunction mlxbf_i2c_smbus_data_byte_funcfunction mlxbf_i2c_smbus_data_word_funcfunction mlxbf_i2c_smbus_i2c_block_funcfunction mlxbf_i2c_smbus_block_funcfunction mlxbf_i2c_smbus_process_call_funcfunction mlxbf_i2c_smbus_blk_process_call_funcfunction mlxbf_i2c_has_chip_typefunction mlxbf_i2c_get_shared_resourcefunction mlxbf_i2c_init_resourcefunction mlxbf_i2c_get_ticksfunction mlxbf_i2c_set_timerfunction mlxbf_i2c_set_timingsfunction mlxbf_i2c_init_timingsfunction mlxbf_i2c_get_gpiofunction mlxbf_i2c_release_gpiofunction mlxbf_i2c_get_corepllfunction mlxbf_i2c_release_corepllfunction mlxbf_i2c_init_masterfunction mlxbf_i2c_calculate_freq_from_tyufunction mlxbf_i2c_calculate_freq_from_yufunction mlxbf_i2c_calculate_corepll_freqfunction mlxbf_i2c_slave_enablefunction mlxbf_i2c_slave_disablefunction mlxbf_i2c_init_coalescefunction mlxbf_i2c_release_coalescefunction mlxbf_i2c_init_slavefunction mlxbf_i2c_has_coalescefunction mlxbf_i2c_irq_sendfunction mlxbf_i2c_irq_recvfunction mlxbf_i2c_irqfunction mlxbf_i2c_smbus_xferfunction mlxbf_i2c_reg_slave
Annotated Snippet
module_init(mlxbf_i2c_init);
static void __exit mlxbf_i2c_exit(void)
{
platform_driver_unregister(&mlxbf_i2c_driver);
mutex_destroy(&mlxbf_i2c_bus_lock);
mutex_destroy(&mlxbf_i2c_gpio_lock);
mutex_destroy(&mlxbf_i2c_corepll_lock);
mutex_destroy(&mlxbf_i2c_coalesce_lock);
}
module_exit(mlxbf_i2c_exit);
MODULE_DESCRIPTION("Mellanox BlueField I2C bus driver");
MODULE_AUTHOR("Khalil Blaiech <kblaiech@nvidia.com>");
MODULE_AUTHOR("Asmaa Mnebhi <asmaa@nvidia.com>");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/bitfield.h`, `linux/delay.h`, `linux/err.h`, `linux/interrupt.h`, `linux/i2c.h`, `linux/io.h`, `linux/iopoll.h`.
- Detected declarations: `struct mlxbf_i2c_timings`, `struct mlxbf_i2c_smbus_operation`, `struct mlxbf_i2c_smbus_request`, `struct mlxbf_i2c_resource`, `struct mlxbf_i2c_chip_info`, `struct mlxbf_i2c_priv`, `enum mlxbf_i2c_chip_type`, `enum mlxbf_i2c_timings_config`, `function mlxbf_i2c_smbus_transaction_success`, `function mlxbf_i2c_smbus_check_status`.
- Atlas domain: Driver Families / drivers/i2c.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.