sound/soc/meson/aiu.c

Source file repositories/reference/linux-study-clean/sound/soc/meson/aiu.c

File Facts

System
Linux kernel
Corpus path
sound/soc/meson/aiu.c
Extension
.c
Size
8794 bytes
Lines
359
Domain
Driver Families
Bucket
sound/soc
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

if (ret) {
			dev_err(dev,
			    "Failed to register acodec control component\n");
			goto err;
		}
	}

	return 0;
err:
	snd_soc_unregister_component(dev);
	return ret;
}

static void aiu_remove(struct platform_device *pdev)
{
	snd_soc_unregister_component(&pdev->dev);
}

static const struct aiu_platform_data aiu_gxbb_pdata = {
	.has_acodec = false,
	.has_clk_ctrl_more_i2s_div = true,
};

static const struct aiu_platform_data aiu_gxl_pdata = {
	.has_acodec = true,
	.has_clk_ctrl_more_i2s_div = true,
};

static const struct aiu_platform_data aiu_meson8_pdata = {
	.has_acodec = false,
	.has_clk_ctrl_more_i2s_div = false,
};

static const struct of_device_id aiu_of_match[] = {
	{ .compatible = "amlogic,aiu-gxbb", .data = &aiu_gxbb_pdata },
	{ .compatible = "amlogic,aiu-gxl", .data = &aiu_gxl_pdata },
	{ .compatible = "amlogic,aiu-meson8", .data = &aiu_meson8_pdata },
	{ .compatible = "amlogic,aiu-meson8b", .data = &aiu_meson8_pdata },
	{}
};
MODULE_DEVICE_TABLE(of, aiu_of_match);

static struct platform_driver aiu_pdrv = {
	.probe = aiu_probe,
	.remove = aiu_remove,
	.driver = {
		.name = "meson-aiu",
		.of_match_table = aiu_of_match,
	},
};
module_platform_driver(aiu_pdrv);

MODULE_DESCRIPTION("Meson AIU Driver");
MODULE_AUTHOR("Jerome Brunet <jbrunet@baylibre.com>");
MODULE_LICENSE("GPL v2");

Annotation

Implementation Notes