sound/soc/sdca/sdca_function_device.c
Source file repositories/reference/linux-study-clean/sound/soc/sdca/sdca_function_device.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sdca/sdca_function_device.c- Extension
.c- Size
- 3376 bytes
- Lines
- 136
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/module.hlinux/auxiliary_bus.hlinux/soundwire/sdw.hsound/sdca.hsound/sdca_function.hsdca_function_device.h
Detected Declarations
function sdca_dev_releasefunction sdca_dev_unregisterfunction sdca_dev_register_functionsfunction sdca_dev_unregister_functions
Annotated Snippet
if (IS_ERR(func_dev)) {
ret = PTR_ERR(func_dev);
/*
* Unregister functions that were successfully
* registered before this failure. This also
* sets func_dev to NULL so the caller will not
* try to unregister them again.
*/
sdca_dev_unregister_functions(slave);
return ret;
}
sdca_data->function[i].func_dev = func_dev;
}
return 0;
}
EXPORT_SYMBOL_NS(sdca_dev_register_functions, "SND_SOC_SDCA");
void sdca_dev_unregister_functions(struct sdw_slave *slave)
{
struct sdca_device_data *sdca_data = &slave->sdca_data;
int i;
for (i = 0; i < sdca_data->num_functions; i++) {
if (!sdca_data->function[i].func_dev)
continue;
sdca_dev_unregister(sdca_data->function[i].func_dev);
sdca_data->function[i].func_dev = NULL;
}
}
EXPORT_SYMBOL_NS(sdca_dev_unregister_functions, "SND_SOC_SDCA");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/module.h`, `linux/auxiliary_bus.h`, `linux/soundwire/sdw.h`, `sound/sdca.h`, `sound/sdca_function.h`, `sdca_function_device.h`.
- Detected declarations: `function sdca_dev_release`, `function sdca_dev_unregister`, `function sdca_dev_register_functions`, `function sdca_dev_unregister_functions`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: integration 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.