drivers/i2c/busses/i2c-ccgx-ucsi.c
Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-ccgx-ucsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/i2c/busses/i2c-ccgx-ucsi.c- Extension
.c- Size
- 794 bytes
- Lines
- 32
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/i2c.hlinux/export.hlinux/module.hlinux/string.hi2c-ccgx-ucsi.h
Detected Declarations
struct software_nodeexport i2c_new_ccgx_ucsi
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Instantiate UCSI device for Cypress CCGx Type-C controller.
* Derived from i2c-designware-pcidrv.c and i2c-nvidia-gpu.c.
*/
#include <linux/i2c.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/string.h>
#include "i2c-ccgx-ucsi.h"
struct software_node;
struct i2c_client *i2c_new_ccgx_ucsi(struct i2c_adapter *adapter, int irq,
const struct software_node *swnode)
{
struct i2c_board_info info = {};
strscpy(info.type, "ccgx-ucsi", sizeof(info.type));
info.addr = 0x08;
info.irq = irq;
info.swnode = swnode;
return i2c_new_client_device(adapter, &info);
}
EXPORT_SYMBOL_GPL(i2c_new_ccgx_ucsi);
MODULE_DESCRIPTION("Instantiate UCSI device for Cypress CCGx Type-C controller");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/i2c.h`, `linux/export.h`, `linux/module.h`, `linux/string.h`, `i2c-ccgx-ucsi.h`.
- Detected declarations: `struct software_node`, `export i2c_new_ccgx_ucsi`.
- Atlas domain: Driver Families / drivers/i2c.
- 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.