drivers/media/usb/gspca/pac_common.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/pac_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/pac_common.h- Extension
.h- Size
- 2922 bytes
- Lines
- 120
- Domain
- Driver Families
- Bucket
- drivers/media
- 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
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
switch (*sof_read) {
case 0:
if (m[i] == 0xff)
*sof_read = 1;
break;
case 1:
if (m[i] == 0xff)
*sof_read = 2;
else
*sof_read = 0;
break;
case 2:
switch (m[i]) {
case 0x00:
*sof_read = 3;
break;
case 0xff:
/* stay in this state */
break;
default:
*sof_read = 0;
}
break;
case 3:
if (m[i] == 0xff)
*sof_read = 4;
else
*sof_read = 0;
break;
case 4:
switch (m[i]) {
case 0x96:
/* Pattern found */
gspca_dbg(gspca_dev, D_FRAM,
"SOF found, bytes to analyze: %u - Frame starts at byte #%u\n",
len, i + 1);
*sof_read = 0;
return m + i + 1;
break;
case 0xff:
*sof_read = 2;
break;
default:
*sof_read = 0;
}
break;
default:
*sof_read = 0;
}
}
return NULL;
}
Annotation
- Atlas domain: Driver Families / drivers/media.
- 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.