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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/device.hlinux/of.hsound/core.hsound/pcm.hsound/soc.hsound/jack.hsound/soc-dapm.h../codecs/sgtl5000.hmxs-saif.h
Detected Declarations
function mxs_sgtl5000_hw_paramsfunction mxs_sgtl5000_probefunction mxs_sgtl5000_remove
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
- Immediate include surface: `linux/module.h`, `linux/device.h`, `linux/of.h`, `sound/core.h`, `sound/pcm.h`, `sound/soc.h`, `sound/jack.h`, `sound/soc-dapm.h`.
- Detected declarations: `function mxs_sgtl5000_hw_params`, `function mxs_sgtl5000_probe`, `function mxs_sgtl5000_remove`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.