drivers/platform/surface/aggregator/controller.h
Source file repositories/reference/linux-study-clean/drivers/platform/surface/aggregator/controller.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/surface/aggregator/controller.h- Extension
.h- Size
- 8820 bytes
- Lines
- 286
- 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
linux/kref.hlinux/list.hlinux/mutex.hlinux/rbtree.hlinux/rwsem.hlinux/serdev.hlinux/spinlock.hlinux/srcu.hlinux/types.hlinux/workqueue.hlinux/surface_aggregator/controller.hlinux/surface_aggregator/serial_hub.hssh_request_layer.h
Detected Declarations
struct ssh_seq_counterstruct ssh_rqid_counterstruct ssam_nf_headstruct ssam_nfstruct ssam_cpltstruct ssam_event_itemstruct ssam_event_queuestruct ssam_event_targetstruct ssam_cpltstruct ssam_controller_capsstruct ssam_controllerenum ssam_controller_statefunction ssam_controller_receive_buffunction ssam_controller_write_wakeup
Annotated Snippet
struct ssh_seq_counter {
u8 value;
};
/**
* struct ssh_rqid_counter - Safe counter for SSH request IDs.
* @value: The current counter value.
*/
struct ssh_rqid_counter {
u16 value;
};
/* -- Event/notification system. -------------------------------------------- */
/**
* struct ssam_nf_head - Notifier head for SSAM events.
* @srcu: The SRCU struct for synchronization.
* @head: List-head for notifier blocks registered under this head.
*/
struct ssam_nf_head {
struct srcu_struct srcu;
struct list_head head;
};
/**
* struct ssam_nf - Notifier callback- and activation-registry for SSAM events.
* @lock: Lock guarding (de-)registration of notifier blocks. Note: This
* lock does not need to be held for notifier calls, only
* registration and deregistration.
* @refcount: The root of the RB-tree used for reference-counting enabled
* events/notifications.
* @head: The list of notifier heads for event/notification callbacks.
*/
struct ssam_nf {
struct mutex lock;
struct rb_root refcount;
struct ssam_nf_head head[SSH_NUM_EVENTS];
};
/* -- Event/async request completion system. -------------------------------- */
struct ssam_cplt;
/**
* struct ssam_event_item - Struct for event queuing and completion.
* @node: The node in the queue.
* @rqid: The request ID of the event.
* @ops: Instance specific functions.
* @ops.free: Callback for freeing this event item.
* @event: Actual event data.
*/
struct ssam_event_item {
struct list_head node;
u16 rqid;
struct {
void (*free)(struct ssam_event_item *event);
} ops;
struct ssam_event event; /* must be last */
};
/**
* struct ssam_event_queue - Queue for completing received events.
* @cplt: Reference to the completion system on which this queue is active.
* @lock: The lock for any operation on the queue.
* @head: The list-head of the queue.
* @work: The &struct work_struct performing completion work for this queue.
*/
struct ssam_event_queue {
struct ssam_cplt *cplt;
spinlock_t lock;
struct list_head head;
struct work_struct work;
};
/**
* struct ssam_event_target - Set of queues for a single SSH target ID.
* @queue: The array of queues, one queue per event ID.
*/
struct ssam_event_target {
struct ssam_event_queue queue[SSH_NUM_EVENTS];
};
/**
* struct ssam_cplt - SSAM event/async request completion system.
* @dev: The device with which this system is associated. Only used
Annotation
- Immediate include surface: `linux/kref.h`, `linux/list.h`, `linux/mutex.h`, `linux/rbtree.h`, `linux/rwsem.h`, `linux/serdev.h`, `linux/spinlock.h`, `linux/srcu.h`.
- Detected declarations: `struct ssh_seq_counter`, `struct ssh_rqid_counter`, `struct ssam_nf_head`, `struct ssam_nf`, `struct ssam_cplt`, `struct ssam_event_item`, `struct ssam_event_queue`, `struct ssam_event_target`, `struct ssam_cplt`, `struct ssam_controller_caps`.
- 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.