drivers/platform/x86/intel/pmc/tgl.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel/pmc/tgl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel/pmc/tgl.c- Extension
.c- Size
- 9124 bytes
- Lines
- 313
- Domain
- Driver Families
- Bucket
- drivers/platform
- 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
core.h
Detected Declarations
enum pch_typefunction pmc_core_get_tgl_lpm_reqsfunction tgl_core_init
Annotated Snippet
if (size != lpm_size) {
acpi_handle_debug(adev->handle,
"_DSM returned unexpected buffer size, have %u, expect %u\n",
size, lpm_size);
goto free_acpi_obj;
}
} else {
acpi_handle_debug(adev->handle,
"_DSM function 0 evaluation failed\n");
goto free_acpi_obj;
}
addr = (u32 *)out_obj->buffer.pointer;
lpm_req_regs = devm_kcalloc(&pdev->dev, lpm_size, sizeof(u32),
GFP_KERNEL);
if (!lpm_req_regs)
goto free_acpi_obj;
memcpy(lpm_req_regs, addr, lpm_size);
pmc->lpm_req_regs = lpm_req_regs;
free_acpi_obj:
ACPI_FREE(out_obj);
}
static int tgl_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info)
{
int ret;
ret = generic_core_init(pmcdev, pmc_dev_info);
if (ret)
return ret;
pmc_core_get_tgl_lpm_reqs(pmcdev->pdev);
return 0;
}
struct pmc_dev_info tgl_l_pmc_dev = {
.map = &tgl_reg_map,
.suspend = cnl_suspend,
.resume = cnl_resume,
.init = tgl_core_init,
};
struct pmc_dev_info tgl_pmc_dev = {
.map = &tgl_h_reg_map,
.suspend = cnl_suspend,
.resume = cnl_resume,
.init = tgl_core_init,
};
Annotation
- Immediate include surface: `core.h`.
- Detected declarations: `enum pch_type`, `function pmc_core_get_tgl_lpm_reqs`, `function tgl_core_init`.
- Atlas domain: Driver Families / drivers/platform.
- 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.