drivers/pnp/pnpacpi/rsparser.c
Source file repositories/reference/linux-study-clean/drivers/pnp/pnpacpi/rsparser.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pnp/pnpacpi/rsparser.c- Extension
.c- Size
- 26489 bytes
- Lines
- 949
- Domain
- Driver Families
- Bucket
- drivers/pnp
- 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.
- 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/kernel.hlinux/acpi.hlinux/pci.hlinux/pnp.hlinux/slab.h../base.hpnpacpi.h
Detected Declarations
struct acpipnp_parse_option_sfunction Copyrightfunction dma_flagsfunction pnpacpi_add_irqresourcefunction vendor_resource_matchesfunction pnpacpi_parse_allocated_vendorfunction pnpacpi_allocated_resourcefunction pnpacpi_parse_allocated_resourcefunction pnpacpi_parse_dma_optionfunction pnpacpi_parse_irq_optionfunction pnpacpi_parse_ext_irq_optionfunction pnpacpi_parse_port_optionfunction pnpacpi_parse_fixed_port_optionfunction pnpacpi_parse_mem24_optionfunction pnpacpi_parse_mem32_optionfunction pnpacpi_parse_fixed_mem32_optionfunction pnpacpi_parse_address_optionfunction pnpacpi_parse_ext_address_optionfunction pnpacpi_option_resourcefunction pnpacpi_parse_resource_option_datafunction pnpacpi_supported_resourcefunction pnpacpi_count_resourcesfunction pnpacpi_type_resourcesfunction pnpacpi_build_resource_templatefunction pnpacpi_encode_irqfunction pnpacpi_encode_ext_irqfunction pnpacpi_encode_dmafunction pnpacpi_encode_iofunction pnpacpi_encode_fixed_iofunction pnpacpi_encode_mem24function pnpacpi_encode_mem32function pnpacpi_encode_fixed_mem32function pnpacpi_encode_resources
Annotated Snippet
struct acpipnp_parse_option_s {
struct pnp_dev *dev;
unsigned int option_flags;
};
static __init acpi_status pnpacpi_option_resource(struct acpi_resource *res,
void *data)
{
int priority;
struct acpipnp_parse_option_s *parse_data = data;
struct pnp_dev *dev = parse_data->dev;
unsigned int option_flags = parse_data->option_flags;
switch (res->type) {
case ACPI_RESOURCE_TYPE_IRQ:
pnpacpi_parse_irq_option(dev, option_flags, &res->data.irq);
break;
case ACPI_RESOURCE_TYPE_DMA:
pnpacpi_parse_dma_option(dev, option_flags, &res->data.dma);
break;
case ACPI_RESOURCE_TYPE_START_DEPENDENT:
switch (res->data.start_dpf.compatibility_priority) {
case ACPI_GOOD_CONFIGURATION:
priority = PNP_RES_PRIORITY_PREFERRED;
break;
case ACPI_ACCEPTABLE_CONFIGURATION:
priority = PNP_RES_PRIORITY_ACCEPTABLE;
break;
case ACPI_SUB_OPTIMAL_CONFIGURATION:
priority = PNP_RES_PRIORITY_FUNCTIONAL;
break;
default:
priority = PNP_RES_PRIORITY_INVALID;
break;
}
parse_data->option_flags = pnp_new_dependent_set(dev, priority);
break;
case ACPI_RESOURCE_TYPE_END_DEPENDENT:
parse_data->option_flags = 0;
break;
case ACPI_RESOURCE_TYPE_IO:
pnpacpi_parse_port_option(dev, option_flags, &res->data.io);
break;
case ACPI_RESOURCE_TYPE_FIXED_IO:
pnpacpi_parse_fixed_port_option(dev, option_flags,
&res->data.fixed_io);
break;
case ACPI_RESOURCE_TYPE_VENDOR:
case ACPI_RESOURCE_TYPE_END_TAG:
break;
case ACPI_RESOURCE_TYPE_MEMORY24:
pnpacpi_parse_mem24_option(dev, option_flags,
&res->data.memory24);
break;
case ACPI_RESOURCE_TYPE_MEMORY32:
pnpacpi_parse_mem32_option(dev, option_flags,
&res->data.memory32);
break;
case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
pnpacpi_parse_fixed_mem32_option(dev, option_flags,
&res->data.fixed_memory32);
break;
case ACPI_RESOURCE_TYPE_ADDRESS16:
case ACPI_RESOURCE_TYPE_ADDRESS32:
case ACPI_RESOURCE_TYPE_ADDRESS64:
pnpacpi_parse_address_option(dev, option_flags, res);
break;
case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
pnpacpi_parse_ext_address_option(dev, option_flags, res);
break;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
pnpacpi_parse_ext_irq_option(dev, option_flags,
&res->data.extended_irq);
break;
case ACPI_RESOURCE_TYPE_GENERIC_REGISTER:
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/acpi.h`, `linux/pci.h`, `linux/pnp.h`, `linux/slab.h`, `../base.h`, `pnpacpi.h`.
- Detected declarations: `struct acpipnp_parse_option_s`, `function Copyright`, `function dma_flags`, `function pnpacpi_add_irqresource`, `function vendor_resource_matches`, `function pnpacpi_parse_allocated_vendor`, `function pnpacpi_allocated_resource`, `function pnpacpi_parse_allocated_resource`, `function pnpacpi_parse_dma_option`, `function pnpacpi_parse_irq_option`.
- Atlas domain: Driver Families / drivers/pnp.
- 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.