drivers/i2c/busses/i2c-npcm7xx.c

Source file repositories/reference/linux-study-clean/drivers/i2c/busses/i2c-npcm7xx.c

File Facts

System
Linux kernel
Corpus path
drivers/i2c/busses/i2c-npcm7xx.c
Extension
.c
Size
71024 bytes
Lines
2622
Domain
Driver Families
Bucket
drivers/i2c
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct smb_timing_t {
	u32 core_clk;
	u8 hldt;
	u8 dbcnt;
	u16 sclfrq;
	u8 scllt;
	u8 sclht;
	bool fast_mode;
};

static struct smb_timing_t smb_timing_100khz[] = {
	{
		.core_clk = 100000000, .hldt = 0x2A, .dbcnt = 0x4,
		.sclfrq = 0xFB, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 62500000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x9D, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 50000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x7E, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 48000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x79, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 40000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x65, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 30000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x4C, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 29000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x49, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 26000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x42, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 25000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x3F, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 24000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x3D, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 20000000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x33, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 16180000, .hldt = 0x2A, .dbcnt = 0x1,
		.sclfrq = 0x29, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 15000000, .hldt = 0x23, .dbcnt = 0x1,
		.sclfrq = 0x26, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 13000000, .hldt = 0x1D, .dbcnt = 0x1,
		.sclfrq = 0x21, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 12000000, .hldt = 0x1B, .dbcnt = 0x1,
		.sclfrq = 0x1F, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,
	},
	{
		.core_clk = 10000000, .hldt = 0x18, .dbcnt = 0x1,
		.sclfrq = 0x1A, .scllt = 0x0, .sclht = 0x0,
		.fast_mode = false,

Annotation

Implementation Notes