diff options
author | 2022-10-01 14:29:01 -0700 | |
---|---|---|
committer | 2022-10-09 22:26:52 -0700 | |
commit | fdd7c96176de823229d88e787b9e554b0f05b6c1 (patch) | |
tree | 4998448c840d9bf4ad40d5b2bc2b3a37cb509fe3 /drivers/input/serio/i8042-acpipnpio.h | |
parent | Input: i8042 - rename i8042-x86ia64io.h to i8042-acpipnpio.h (diff) | |
download | linux-dev-fdd7c96176de823229d88e787b9e554b0f05b6c1.tar.xz linux-dev-fdd7c96176de823229d88e787b9e554b0f05b6c1.zip |
Input: i8042 - add LoongArch support in i8042-acpipnpio.h
LoongArch uses ACPI and nearly the same as X86/IA64 for 8042. So modify
i8042-acpipnpio.h slightly and enable it for LoongArch in i8042.h. Then
i8042 driver can work well under the ACPI firmware with PNP typed key-
board and mouse configured in DSDT.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220917064020.1639709-2-chenhuacai@loongson.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/serio/i8042-acpipnpio.h')
-rw-r--r-- | drivers/input/serio/i8042-acpipnpio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h index e91c6a1814a8..0778dc03cd9e 100644 --- a/drivers/input/serio/i8042-acpipnpio.h +++ b/drivers/input/serio/i8042-acpipnpio.h @@ -2,6 +2,7 @@ #ifndef _I8042_ACPIPNPIO_H #define _I8042_ACPIPNPIO_H +#include <linux/acpi.h> #ifdef CONFIG_X86 #include <asm/x86_init.h> @@ -1453,9 +1454,14 @@ static int __init i8042_pnp_init(void) return -ENODEV; #else pr_info("PNP: No PS/2 controller found.\n"); +#if defined(__loongarch__) + if (acpi_disabled == 0) + return -ENODEV; +#else if (x86_platform.legacy.i8042 != X86_LEGACY_I8042_EXPECTED_PRESENT) return -ENODEV; +#endif pr_info("Probing ports directly.\n"); return 0; #endif |