drivers/soc/tegra/common.c
Source file repositories/reference/linux-study-clean/drivers/soc/tegra/common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/soc/tegra/common.c- Extension
.c- Size
- 4127 bytes
- Lines
- 162
- Domain
- Driver Families
- Bucket
- drivers/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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/device.hlinux/export.hlinux/of.hlinux/pm_opp.hlinux/pm_runtime.hsoc/tegra/common.hsoc/tegra/fuse.h
Detected Declarations
function soc_is_tegrafunction tegra_core_dev_init_opp_statefunction devm_tegra_core_dev_init_opp_tablefunction of_machine_is_compatibleexport devm_tegra_core_dev_init_opp_table
Annotated Snippet
of_machine_is_compatible("nvidia,tegra114")) {
hw_version = BIT(tegra_sku_info.soc_speedo_id);
config.supported_hw = &hw_version;
config.supported_hw_count = 1;
}
err = devm_pm_opp_set_config(dev, &config);
if (err) {
dev_err(dev, "failed to set OPP config: %d\n", err);
return err;
}
/*
* Tegra124+ doesn't support OPP yet, return early for pre-Tegra124
* case.
*/
if (!config.supported_hw)
return -ENODEV;
/*
* Older device-trees have an empty OPP table, we will get
* -ENODEV from devm_pm_opp_of_add_table() in this case.
*/
err = devm_pm_opp_of_add_table(dev);
if (err) {
if (err != -ENODEV)
dev_err(dev, "failed to add OPP table: %d\n", err);
return err;
}
if (params->init_state) {
err = tegra_core_dev_init_opp_state(dev);
if (err)
return err;
}
return 0;
}
EXPORT_SYMBOL_GPL(devm_tegra_core_dev_init_opp_table);
Annotation
- Immediate include surface: `linux/clk.h`, `linux/device.h`, `linux/export.h`, `linux/of.h`, `linux/pm_opp.h`, `linux/pm_runtime.h`, `soc/tegra/common.h`, `soc/tegra/fuse.h`.
- Detected declarations: `function soc_is_tegra`, `function tegra_core_dev_init_opp_state`, `function devm_tegra_core_dev_init_opp_table`, `function of_machine_is_compatible`, `export devm_tegra_core_dev_init_opp_table`.
- Atlas domain: Driver Families / drivers/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.