drivers/gpu/drm/omapdrm/dss/hdmi4_core.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
Extension
.c
Size
26363 bytes
Lines
889
Domain
Driver Families
Bucket
drivers/gpu
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 hdmi4_features {
	bool cts_swmode;
	bool audio_use_mclk;
};

static const struct hdmi4_features hdmi4430_es1_features = {
	.cts_swmode = false,
	.audio_use_mclk = false,
};

static const struct hdmi4_features hdmi4430_es2_features = {
	.cts_swmode = true,
	.audio_use_mclk = false,
};

static const struct hdmi4_features hdmi4_features = {
	.cts_swmode = true,
	.audio_use_mclk = true,
};

static const struct soc_device_attribute hdmi4_soc_devices[] = {
	{
		.machine = "OMAP4430",
		.revision = "ES1.?",
		.data = &hdmi4430_es1_features,
	},
	{
		.machine = "OMAP4430",
		.revision = "ES2.?",
		.data = &hdmi4430_es2_features,
	},
	{
		.family = "OMAP4",
		.data = &hdmi4_features,
	},
	{ /* sentinel */ }
};

int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
{
	const struct hdmi4_features *features;
	const struct soc_device_attribute *soc;

	soc = soc_device_match(hdmi4_soc_devices);
	if (!soc)
		return -ENODEV;

	features = soc->data;
	core->cts_swmode = features->cts_swmode;
	core->audio_use_mclk = features->audio_use_mclk;

	core->base = devm_platform_ioremap_resource_byname(pdev, "core");
	if (IS_ERR(core->base))
		return PTR_ERR(core->base);

	return 0;
}

Annotation

Implementation Notes