include/linux/greybus/greybus_manifest.h
Source file repositories/reference/linux-study-clean/include/linux/greybus/greybus_manifest.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/greybus/greybus_manifest.h- Extension
.h- Size
- 4902 bytes
- Lines
- 182
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/types.h
Detected Declarations
struct greybus_descriptor_stringstruct greybus_descriptor_interfacestruct greybus_descriptor_bundlestruct greybus_descriptor_cportstruct greybus_descriptor_headerstruct greybus_descriptorstruct greybus_manifest_headerstruct greybus_manifestenum greybus_descriptor_typeenum greybus_protocolenum greybus_class_type
Annotated Snippet
struct greybus_descriptor_string {
__u8 length;
__u8 id;
__u8 string[];
} __packed;
/*
* An interface descriptor describes information about an interface as a whole,
* *not* the functions within it.
*/
struct greybus_descriptor_interface {
__u8 vendor_stringid;
__u8 product_stringid;
__u8 features;
__u8 pad;
} __packed;
/*
* An bundle descriptor defines an identification number and a class for
* each bundle.
*
* @id: Uniquely identifies a bundle within a interface, its sole purpose is to
* allow CPort descriptors to specify which bundle they are associated with.
* The first bundle will have id 0, second will have 1 and so on.
*
* The largest CPort id associated with an bundle (defined by a
* CPort descriptor in the manifest) is used to determine how to
* encode the device id and module number in UniPro packets
* that use the bundle.
*
* @class: It is used by kernel to know the functionality provided by the
* bundle and will be matched against drivers functinality while probing greybus
* driver. It should contain one of the values defined in
* 'enum greybus_class_type'.
*
*/
struct greybus_descriptor_bundle {
__u8 id; /* interface-relative id (0..) */
__u8 class;
__u8 pad[2];
} __packed;
/*
* A CPort descriptor indicates the id of the bundle within the
* module it's associated with, along with the CPort id used to
* address the CPort. The protocol id defines the format of messages
* exchanged using the CPort.
*/
struct greybus_descriptor_cport {
__le16 id;
__u8 bundle;
__u8 protocol_id; /* enum greybus_protocol */
} __packed;
struct greybus_descriptor_header {
__le16 size;
__u8 type; /* enum greybus_descriptor_type */
__u8 pad;
} __packed;
struct greybus_descriptor {
struct greybus_descriptor_header header;
union {
struct greybus_descriptor_string string;
struct greybus_descriptor_interface interface;
struct greybus_descriptor_bundle bundle;
struct greybus_descriptor_cport cport;
};
} __packed;
struct greybus_manifest_header {
__le16 size;
__u8 version_major;
__u8 version_minor;
} __packed;
struct greybus_manifest {
struct greybus_manifest_header header;
struct greybus_descriptor descriptors[];
} __packed;
#endif /* __GREYBUS_MANIFEST_H */
Annotation
- Immediate include surface: `linux/bits.h`, `linux/types.h`.
- Detected declarations: `struct greybus_descriptor_string`, `struct greybus_descriptor_interface`, `struct greybus_descriptor_bundle`, `struct greybus_descriptor_cport`, `struct greybus_descriptor_header`, `struct greybus_descriptor`, `struct greybus_manifest_header`, `struct greybus_manifest`, `enum greybus_descriptor_type`, `enum greybus_protocol`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.