drivers/i2c/busses/i2c-i801.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-i801.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-i801.c- Extension
.c- Size
- 55161 bytes
- Lines
- 1770
- Domain
- Driver Families
- Bucket
- drivers/i2c
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/interrupt.hlinux/module.hlinux/pci.hlinux/kernel.hlinux/stddef.hlinux/delay.hlinux/ioport.hlinux/init.hlinux/i2c.hlinux/i2c-mux.hlinux/i2c-smbus.hlinux/acpi.hlinux/io.hlinux/dmi.hlinux/slab.hlinux/string.hlinux/completion.hlinux/err.hlinux/platform_device.hlinux/platform_data/itco_wdt.hlinux/platform_data/x86/p2sb.hlinux/pm_runtime.hlinux/mutex.hlinux/gpio/machine.hlinux/platform_data/i2c-mux-gpio.h
Detected Declarations
struct i801_mux_configstruct i801_privstruct dmi_onboard_device_infofunction i801_wait_intrfunction i801_wait_byte_donefunction i801_get_block_lenfunction i801_check_and_clear_pec_errorfunction i801_check_prefunction i801_check_postfunction i801_transactionfunction i801_block_transaction_by_blockfunction i801_isr_byte_donefunction i801_host_notify_isrfunction i801_isrfunction i801_block_transaction_byte_by_bytefunction i801_smbus_block_transactionfunction i801_set_hstaddfunction i801_simple_transactionfunction i801_smbus_block_transactionfunction i801_i2c_block_transactionfunction i801_accessfunction i801_funcfunction i801_enable_host_notifyfunction i801_disable_host_notifyfunction input_apanel_initfunction dmi_check_onboard_devicefunction dmi_find_devicefunction i801_probe_optional_targetsfunction input_apanel_initfunction i801_notifier_callfunction i801_add_muxfunction i801_del_muxfunction i801_add_muxfunction i801_add_tco_cnlfunction i801_add_tcofunction i801_acpi_is_smbus_ioportfunction i801_acpi_io_handlerfunction i801_acpi_probefunction i801_acpi_removefunction i801_acpi_probefunction i801_acpi_removefunction i801_restore_regsfunction i801_probefunction i801_removefunction pci_disable_devicefunction i801_suspendfunction i801_resumefunction i2c_i801_init
Annotated Snippet
static struct pci_driver i801_driver = {
.name = DRV_NAME,
.id_table = i801_ids,
.probe = i801_probe,
.remove = i801_remove,
.shutdown = i801_shutdown,
.driver = {
.pm = pm_sleep_ptr(&i801_pm_ops),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
static int __init i2c_i801_init(struct pci_driver *drv)
{
if (dmi_name_in_vendors("FUJITSU"))
input_apanel_init();
return pci_register_driver(drv);
}
MODULE_AUTHOR("Mark D. Studebaker <mdsxyz123@yahoo.com>");
MODULE_AUTHOR("Jean Delvare <jdelvare@suse.de>");
MODULE_DESCRIPTION("I801 SMBus driver");
MODULE_LICENSE("GPL");
module_driver(i801_driver, i2c_i801_init, pci_unregister_driver);
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/module.h`, `linux/pci.h`, `linux/kernel.h`, `linux/stddef.h`, `linux/delay.h`, `linux/ioport.h`, `linux/init.h`.
- Detected declarations: `struct i801_mux_config`, `struct i801_priv`, `struct dmi_onboard_device_info`, `function i801_wait_intr`, `function i801_wait_byte_done`, `function i801_get_block_len`, `function i801_check_and_clear_pec_error`, `function i801_check_pre`, `function i801_check_post`, `function i801_transaction`.
- Atlas domain: Driver Families / drivers/i2c.
- Implementation status: pattern 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.