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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/device.hlinux/mod_devicetable.hlinux/soundwire/sdw.hlinux/soundwire/sdw_type.hlinux/soundwire/sdw_registers.hlinux/module.hlinux/pm_runtime.hlinux/regmap.hsound/soc.hrt711.hrt711-sdw.h
Detected Declarations
function rt711_readable_registerfunction rt711_volatile_registerfunction rt711_sdw_readfunction rt711_sdw_writefunction rt711_update_statusfunction rt711_read_propfunction rt711_bus_configfunction rt711_interrupt_callbackfunction rt711_sdw_probefunction rt711_sdw_removefunction rt711_dev_suspendfunction rt711_dev_system_suspendfunction rt711_dev_resume
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
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/mod_devicetable.h`, `linux/soundwire/sdw.h`, `linux/soundwire/sdw_type.h`, `linux/soundwire/sdw_registers.h`, `linux/module.h`, `linux/pm_runtime.h`.
- Detected declarations: `function rt711_readable_register`, `function rt711_volatile_register`, `function rt711_sdw_read`, `function rt711_sdw_write`, `function rt711_update_status`, `function rt711_read_prop`, `function rt711_bus_config`, `function rt711_interrupt_callback`, `function rt711_sdw_probe`, `function rt711_sdw_remove`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.