Skip to content

Commit 6246ed0

Browse files
lvjianmin-loongsonchenhuacai
authored andcommitted
LoongArch: Add ACPI-based generic laptop driver
This add ACPI-based generic laptop driver for Loongson-3. Some of the codes are derived from drivers/platform/x86/thinkpad_acpi.c. Signed-off-by: Jianmin Lv <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 5dc6155 commit 6246ed0

File tree

5 files changed

+659
-0
lines changed

5 files changed

+659
-0
lines changed

drivers/platform/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ if MIPS
33
source "drivers/platform/mips/Kconfig"
44
endif
55

6+
source "drivers/platform/loongarch/Kconfig"
7+
68
source "drivers/platform/goldfish/Kconfig"
79

810
source "drivers/platform/chrome/Kconfig"

drivers/platform/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55

66
obj-$(CONFIG_X86) += x86/
7+
obj-$(CONFIG_LOONGARCH) += loongarch/
78
obj-$(CONFIG_MELLANOX_PLATFORM) += mellanox/
89
obj-$(CONFIG_MIPS) += mips/
910
obj-$(CONFIG_OLPC_EC) += olpc/

drivers/platform/loongarch/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# LoongArch Platform Specific Drivers
3+
#
4+
5+
menuconfig LOONGARCH_PLATFORM_DEVICES
6+
bool "LoongArch Platform Specific Device Drivers"
7+
default y
8+
depends on LOONGARCH
9+
help
10+
Say Y here to get to see options for device drivers of various
11+
LoongArch platforms, including vendor-specific laptop/desktop
12+
extension and hardware monitor drivers. This option itself does
13+
not add any kernel code.
14+
15+
If you say N, all options in this submenu will be skipped and disabled.
16+
17+
if LOONGARCH_PLATFORM_DEVICES
18+
19+
config LOONGSON_LAPTOP
20+
tristate "Generic Loongson-3 Laptop Driver"
21+
depends on ACPI
22+
depends on BACKLIGHT_CLASS_DEVICE
23+
depends on INPUT
24+
depends on MACH_LOONGSON64
25+
select ACPI_VIDEO
26+
select INPUT_SPARSEKMAP
27+
default y
28+
help
29+
ACPI-based Loongson-3 family laptops generic driver.
30+
31+
endif # LOONGARCH_PLATFORM_DEVICES

drivers/platform/loongarch/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_LOONGSON_LAPTOP) += loongson-laptop.o

0 commit comments

Comments
 (0)