include/linux/libps2.h
Source file repositories/reference/linux-study-clean/include/linux/libps2.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/libps2.h- Extension
.h- Size
- 2529 bytes
- Lines
- 76
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/interrupt.hlinux/mutex.hlinux/types.hlinux/wait.h
Detected Declarations
struct ps2devstruct ps2devenum ps2_disposition
Annotated Snippet
struct ps2dev {
struct serio *serio;
struct mutex cmd_mutex;
wait_queue_head_t wait;
unsigned long flags;
u8 cmdbuf[8];
u8 cmdcnt;
u8 nak;
ps2_pre_receive_handler_t pre_receive_handler;
ps2_receive_handler_t receive_handler;
};
void ps2_init(struct ps2dev *ps2dev, struct serio *serio,
ps2_pre_receive_handler_t pre_receive_handler,
ps2_receive_handler_t receive_handler);
int ps2_sendbyte(struct ps2dev *ps2dev, u8 byte, unsigned int timeout);
void ps2_drain(struct ps2dev *ps2dev, size_t maxbytes, unsigned int timeout);
void ps2_begin_command(struct ps2dev *ps2dev);
void ps2_end_command(struct ps2dev *ps2dev);
int __ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command);
int ps2_command(struct ps2dev *ps2dev, u8 *param, unsigned int command);
int ps2_sliced_command(struct ps2dev *ps2dev, u8 command);
bool ps2_is_keyboard_id(u8 id);
irqreturn_t ps2_interrupt(struct serio *serio, u8 data, unsigned int flags);
#endif /* _LIBPS2_H */
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/types.h`, `linux/wait.h`.
- Detected declarations: `struct ps2dev`, `struct ps2dev`, `enum ps2_disposition`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.