sound/soc/codecs/rt711-sdw.c

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

File Facts

System
Linux kernel
Corpus path
sound/soc/codecs/rt711-sdw.c
Extension
.c
Size
14104 bytes
Lines
578
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 (rt711->disable_irq == true) {
			sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
			rt711->disable_irq = false;
		}
		mutex_unlock(&rt711->disable_irq_lock);
	}

	ret = sdw_slave_wait_for_init(slave, RT711_PROBE_TIMEOUT);
	if (ret)
		return ret;

	regcache_cache_only(rt711->regmap, false);
	regcache_sync_region(rt711->regmap, 0x3000, 0x8fff);
	regcache_sync_region(rt711->regmap, 0x752009, 0x752091);

	return 0;
}

static const struct dev_pm_ops rt711_pm = {
	SYSTEM_SLEEP_PM_OPS(rt711_dev_system_suspend, rt711_dev_resume)
	RUNTIME_PM_OPS(rt711_dev_suspend, rt711_dev_resume, NULL)
};

static struct sdw_driver rt711_sdw_driver = {
	.driver = {
		.name = "rt711",
		.pm = pm_ptr(&rt711_pm),
	},
	.probe = rt711_sdw_probe,
	.remove = rt711_sdw_remove,
	.ops = &rt711_slave_ops,
	.id_table = rt711_id,
};
module_sdw_driver(rt711_sdw_driver);

MODULE_DESCRIPTION("ASoC RT711 SDW driver");
MODULE_AUTHOR("Shuming Fan <shumingf@realtek.com>");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes