drivers/acpi/x86/apple.c
Source file repositories/reference/linux-study-clean/drivers/acpi/x86/apple.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/x86/apple.c- Extension
.c- Size
- 4603 bytes
- Lines
- 149
- Domain
- Driver Families
- Bucket
- drivers/acpi
- 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
linux/acpi.hlinux/bitmap.hlinux/platform_data/x86/apple.hlinux/uuid.h../internal.h
Detected Declarations
function acpi_extract_apple_propertiesfunction for_each_set_bit
Annotated Snippet
if (val->type == ACPI_TYPE_INTEGER) {
newprops[v].integer.value = val->integer.value;
} else if (val->type == ACPI_TYPE_STRING) {
newprops[v].string.length = val->string.length;
newprops[v].string.pointer = free_space;
memcpy(free_space, val->string.pointer,
val->string.length);
free_space += val->string.length + 1;
} else {
newprops[v].buffer.length = val->buffer.length;
newprops[v].buffer.pointer = free_space;
memcpy(free_space, val->buffer.pointer,
val->buffer.length);
free_space += val->buffer.length;
}
j++; /* count valid properties */
}
WARN_ON(free_space != (void *)newprops + newsize);
adev->data.pointer = newprops;
acpi_data_add_props(&adev->data, &apple_prp_guid, newprops);
out_free:
ACPI_FREE(props);
bitmap_free(valid);
}
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/bitmap.h`, `linux/platform_data/x86/apple.h`, `linux/uuid.h`, `../internal.h`.
- Detected declarations: `function acpi_extract_apple_properties`, `function for_each_set_bit`.
- Atlas domain: Driver Families / drivers/acpi.
- 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.