include/linux/i8042.h
Source file repositories/reference/linux-study-clean/include/linux/i8042.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/i8042.h- Extension
.h- Size
- 2512 bytes
- Lines
- 109
- 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/errno.hlinux/types.h
Detected Declarations
struct seriofunction i8042_lock_chipfunction i8042_install_filterfunction i8042_remove_filter
Annotated Snippet
#ifndef _LINUX_I8042_H
#define _LINUX_I8042_H
#include <linux/errno.h>
#include <linux/types.h>
/*
* Standard commands.
*/
#define I8042_CMD_CTL_RCTR 0x0120
#define I8042_CMD_CTL_WCTR 0x1060
#define I8042_CMD_CTL_TEST 0x01aa
#define I8042_CMD_KBD_DISABLE 0x00ad
#define I8042_CMD_KBD_ENABLE 0x00ae
#define I8042_CMD_KBD_TEST 0x01ab
#define I8042_CMD_KBD_LOOP 0x11d2
#define I8042_CMD_AUX_DISABLE 0x00a7
#define I8042_CMD_AUX_ENABLE 0x00a8
#define I8042_CMD_AUX_TEST 0x01a9
#define I8042_CMD_AUX_SEND 0x10d4
#define I8042_CMD_AUX_LOOP 0x11d3
#define I8042_CMD_MUX_PFX 0x0090
#define I8042_CMD_MUX_SEND 0x1090
/*
* Status register bits.
*/
#define I8042_STR_PARITY 0x80
#define I8042_STR_TIMEOUT 0x40
#define I8042_STR_AUXDATA 0x20
#define I8042_STR_KEYLOCK 0x10
#define I8042_STR_CMDDAT 0x08
#define I8042_STR_MUXERR 0x04
#define I8042_STR_IBF 0x02
#define I8042_STR_OBF 0x01
/*
* Control register bits.
*/
#define I8042_CTR_KBDINT 0x01
#define I8042_CTR_AUXINT 0x02
#define I8042_CTR_IGNKEYLOCK 0x08
#define I8042_CTR_KBDDIS 0x10
#define I8042_CTR_AUXDIS 0x20
#define I8042_CTR_XLATE 0x40
struct serio;
/**
* typedef i8042_filter_t - i8042 filter callback
* @data: Data received by the i8042 controller
* @str: Status register of the i8042 controller
* @serio: Serio of the i8042 controller
* @context: Context pointer associated with this callback
*
* This represents a i8042 filter callback which can be used with i8042_install_filter()
* and i8042_remove_filter() to filter the i8042 input for platform-specific key codes.
*
* Context: Interrupt context.
* Returns: true if the data should be filtered out, false if otherwise.
*/
typedef bool (*i8042_filter_t)(unsigned char data, unsigned char str, struct serio *serio,
void *context);
#if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE)
void i8042_lock_chip(void);
void i8042_unlock_chip(void);
int i8042_command(unsigned char *param, int command);
int i8042_install_filter(i8042_filter_t filter, void *context);
int i8042_remove_filter(i8042_filter_t filter);
#else
static inline void i8042_lock_chip(void)
{
}
static inline void i8042_unlock_chip(void)
{
}
static inline int i8042_command(unsigned char *param, int command)
Annotation
- Immediate include surface: `linux/errno.h`, `linux/types.h`.
- Detected declarations: `struct serio`, `function i8042_lock_chip`, `function i8042_install_filter`, `function i8042_remove_filter`.
- 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.