sound/soc/codecs/rt5575.c

Source file repositories/reference/linux-study-clean/sound/soc/codecs/rt5575.c

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt5575.c
Extension
.c
Size
9746 bytes
Lines
352
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 (!IS_ENABLED(CONFIG_SND_SOC_RT5575_SPI)) {
			dev_err(dev, "Please enable CONFIG_SND_SOC_RT5575_SPI\n");
			return -ENODEV;
		}

		if (rt5575_fw_load_by_spi(rt5575))
			return -ENODEV;
	}

	return devm_snd_soc_register_component(dev, &rt5575_soc_component_dev, rt5575_dai,
					       ARRAY_SIZE(rt5575_dai));
}

static const struct i2c_device_id rt5575_i2c_id[] = {
	{ .name = "rt5575" },
	{ }
};
MODULE_DEVICE_TABLE(i2c, rt5575_i2c_id);

static const struct of_device_id rt5575_of_match[] = {
	{ .compatible = "realtek,rt5575" },
	{ }
};
MODULE_DEVICE_TABLE(of, rt5575_of_match);

static struct i2c_driver rt5575_i2c_driver = {
	.driver = {
		.name = "rt5575",
		.of_match_table = rt5575_of_match,
	},
	.probe = rt5575_i2c_probe,
	.id_table = rt5575_i2c_id,
};
module_i2c_driver(rt5575_i2c_driver);

MODULE_DESCRIPTION("ASoC ALC5575 driver");
MODULE_AUTHOR("Oder Chiou <oder_chiou@realtek.com>");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes