sound/soc/mxs/mxs-sgtl5000.c

Source file repositories/reference/linux-study-clean/sound/soc/mxs/mxs-sgtl5000.c

File Facts

System
Linux kernel
Corpus path
sound/soc/mxs/mxs-sgtl5000.c
Extension
.c
Size
5344 bytes
Lines
200
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(&pdev->dev, "failed to parse audio-routing (%d)\n",
				ret);
			mxs_saif_put_mclk(0);
			return ret;
		}
	}

	ret = devm_snd_soc_register_card(&pdev->dev, card);
	if (ret) {
		mxs_saif_put_mclk(0);
		return dev_err_probe(&pdev->dev, ret, "snd_soc_register_card failed\n");
	}

	return 0;
}

static void mxs_sgtl5000_remove(struct platform_device *pdev)
{
	mxs_saif_put_mclk(0);
}

static const struct of_device_id mxs_sgtl5000_dt_ids[] = {
	{ .compatible = "fsl,mxs-audio-sgtl5000", },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, mxs_sgtl5000_dt_ids);

static struct platform_driver mxs_sgtl5000_audio_driver = {
	.driver = {
		.name = "mxs-sgtl5000",
		.of_match_table = mxs_sgtl5000_dt_ids,
	},
	.probe = mxs_sgtl5000_probe,
	.remove = mxs_sgtl5000_remove,
};

module_platform_driver(mxs_sgtl5000_audio_driver);

MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("MXS ALSA SoC Machine driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:mxs-sgtl5000");

Annotation

Implementation Notes