Skip to content

Commit

Permalink
LoongArch: Add ACPI-based generic laptop driver
Browse files Browse the repository at this point in the history
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 <lvjianmin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
lvjianmin-loongson authored and intel-lab-lkp committed Sep 17, 2022
1 parent d2c3fe5 commit 3ebe278
Show file tree
Hide file tree
Showing 5 changed files with 662 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/platform/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
if MIPS
source "drivers/platform/mips/Kconfig"
endif
if LOONGARCH
source "drivers/platform/loongarch/Kconfig"
endif

source "drivers/platform/goldfish/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

obj-$(CONFIG_X86) += x86/
obj-$(CONFIG_LOONGARCH) += loongarch/
obj-$(CONFIG_MELLANOX_PLATFORM) += mellanox/
obj-$(CONFIG_MIPS) += mips/
obj-$(CONFIG_OLPC_EC) += olpc/
Expand Down
30 changes: 30 additions & 0 deletions drivers/platform/loongarch/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# LoongArch Platform Specific Drivers
#

menuconfig LOONGARCH_PLATFORM_DEVICES
bool "LoongArch Platform Specific Device Drivers"
default LOONGARCH
help
Say Y here to get to see options for device drivers of various
LoongArch platforms, including vendor-specific laptop/desktop
extension and hardware monitor drivers. This option itself does
not add any kernel code.

If you say N, all options in this submenu will be skipped and disabled.

if LOONGARCH_PLATFORM_DEVICES

config GENERIC_LAPTOP
tristate "Generic Loongson-3 Laptop Driver"
depends on ACPI
depends on BACKLIGHT_CLASS_DEVICE
depends on INPUT
depends on MACH_LOONGSON64
select INPUT_EVDEV
select INPUT_SPARSEKMAP
default y
help
ACPI-based Loongson-3 family laptops generic driver.

endif # LOONGARCH_PLATFORM_DEVICES
1 change: 1 addition & 0 deletions drivers/platform/loongarch/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_GENERIC_LAPTOP) += generic-laptop.o

0 comments on commit 3ebe278

Please sign in to comment.