mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 04:50:57 +07:00
181d683d75
The serio ports on i8042 are not completely isolated; while we provide enough locking to ensure proper serialization when accessing control and data registers AUX and KBD ports can still have an effect on each other on PS/2 protocol level. The most prominent effect is that issuing a command for the device connected to one port may cause abort of the command currently executing by the device connected to another port. Since i8042 nor serio subsystem are not aware of the details of the PS/2 protocol (length of the commands and their replies and so on) the locking should be done on libps2 level by adding special handling when we see that we are dealing with serio port on i8042. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
66 lines
1.2 KiB
C
66 lines
1.2 KiB
C
#ifndef _LINUX_I8042_H
|
|
#define _LINUX_I8042_H
|
|
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published by
|
|
* the Free Software Foundation.
|
|
*/
|
|
|
|
#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
|
|
|
|
struct serio;
|
|
|
|
#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);
|
|
bool i8042_check_port_owner(const struct serio *);
|
|
|
|
#else
|
|
|
|
void i8042_lock_chip(void)
|
|
{
|
|
}
|
|
|
|
void i8042_unlock_chip(void)
|
|
{
|
|
}
|
|
|
|
int i8042_command(unsigned char *param, int command)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
bool i8042_check_port_owner(const struct serio *serio)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|