drivers/hid/surface-hid/surface_hid_core.h
Source file repositories/reference/linux-study-clean/drivers/hid/surface-hid/surface_hid_core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/surface-hid/surface_hid_core.h- Extension
.h- Size
- 2088 bytes
- Lines
- 78
- Domain
- Driver Families
- Bucket
- drivers/hid
- 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/hid.hlinux/pm.hlinux/types.hlinux/surface_aggregator/controller.hlinux/surface_aggregator/device.h
Detected Declarations
struct surface_hid_descriptorstruct surface_hid_attributesstruct surface_hid_devicestruct surface_hid_device_opsstruct surface_hid_deviceenum surface_hid_descriptor_entry
Annotated Snippet
struct surface_hid_descriptor {
__u8 desc_len; /* = 9 */
__u8 desc_type; /* = HID_DT_HID */
__le16 hid_version;
__u8 country_code;
__u8 num_descriptors; /* = 1 */
__u8 report_desc_type; /* = HID_DT_REPORT */
__le16 report_desc_len;
} __packed;
static_assert(sizeof(struct surface_hid_descriptor) == 9);
struct surface_hid_attributes {
__le32 length;
__le16 vendor;
__le16 product;
__le16 version;
__u8 _unknown[22];
} __packed;
static_assert(sizeof(struct surface_hid_attributes) == 32);
struct surface_hid_device;
struct surface_hid_device_ops {
int (*get_descriptor)(struct surface_hid_device *shid, u8 entry, u8 *buf, size_t len);
int (*output_report)(struct surface_hid_device *shid, u8 rprt_id, u8 *buf, size_t len);
int (*get_feature_report)(struct surface_hid_device *shid, u8 rprt_id, u8 *buf, size_t len);
int (*set_feature_report)(struct surface_hid_device *shid, u8 rprt_id, u8 *buf, size_t len);
};
struct surface_hid_device {
struct device *dev;
struct ssam_controller *ctrl;
struct ssam_device_uid uid;
struct surface_hid_descriptor hid_desc;
struct surface_hid_attributes attrs;
struct ssam_event_notifier notif;
struct hid_device *hid;
struct surface_hid_device_ops ops;
};
int surface_hid_device_add(struct surface_hid_device *shid);
void surface_hid_device_destroy(struct surface_hid_device *shid);
extern const struct dev_pm_ops surface_hid_pm_ops;
#endif /* SURFACE_HID_CORE_H */
Annotation
- Immediate include surface: `linux/hid.h`, `linux/pm.h`, `linux/types.h`, `linux/surface_aggregator/controller.h`, `linux/surface_aggregator/device.h`.
- Detected declarations: `struct surface_hid_descriptor`, `struct surface_hid_attributes`, `struct surface_hid_device`, `struct surface_hid_device_ops`, `struct surface_hid_device`, `enum surface_hid_descriptor_entry`.
- Atlas domain: Driver Families / drivers/hid.
- 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.