diff mbox series

ACPI: EC: Enable EC support on LoongArch by default

Message ID 20241217073704.3339587-1-chenhuacai@loongson.cn (mailing list archive)
State Queued
Delegated to: Rafael Wysocki
Headers show
Series ACPI: EC: Enable EC support on LoongArch by default | expand

Commit Message

Huacai Chen Dec. 17, 2024, 7:37 a.m. UTC
Commit a6021aa24f6417416d933 ("ACPI: EC: make EC support compile-time
conditional") only enable ACPI_EC on X86 by default, but the embedded
controller is also widely used on LoongArch laptops so we also enable
ACPI_EC for LoongArch.

The laptop driver cannot work without EC, so also update the dependency
of LOONGSON_LAPTOP to let it depend on APCI_EC.

Reported-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Tested-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 drivers/acpi/Kconfig               | 4 ++--
 drivers/platform/loongarch/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Rafael J. Wysocki Dec. 18, 2024, 7:27 p.m. UTC | #1
On Tue, Dec 17, 2024 at 8:37 AM Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> Commit a6021aa24f6417416d933 ("ACPI: EC: make EC support compile-time
> conditional") only enable ACPI_EC on X86 by default, but the embedded
> controller is also widely used on LoongArch laptops so we also enable
> ACPI_EC for LoongArch.
>
> The laptop driver cannot work without EC, so also update the dependency
> of LOONGSON_LAPTOP to let it depend on APCI_EC.
>
> Reported-by: Xiaotian Wu <wuxiaotian@loongson.cn>
> Tested-by: Binbin Zhou <zhoubinbin@loongson.cn>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  drivers/acpi/Kconfig               | 4 ++--
>  drivers/platform/loongarch/Kconfig | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index d65cd08ba8e1..d81b55f5068c 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -135,10 +135,10 @@ config ACPI_REV_OVERRIDE_POSSIBLE
>  config ACPI_EC
>         bool "Embedded Controller"
>         depends on HAS_IOPORT
> -       default X86
> +       default X86 || LOONGARCH
>         help
>           This driver handles communication with the microcontroller
> -         on many x86 laptops and other machines.
> +         on many x86/LoongArch laptops and other machines.
>
>  config ACPI_EC_DEBUGFS
>         tristate "EC read/write access through /sys/kernel/debug/ec"
> diff --git a/drivers/platform/loongarch/Kconfig b/drivers/platform/loongarch/Kconfig
> index 5633e4d73991..447528797d07 100644
> --- a/drivers/platform/loongarch/Kconfig
> +++ b/drivers/platform/loongarch/Kconfig
> @@ -18,7 +18,7 @@ if LOONGARCH_PLATFORM_DEVICES
>
>  config LOONGSON_LAPTOP
>         tristate "Generic Loongson-3 Laptop Driver"
> -       depends on ACPI
> +       depends on ACPI_EC
>         depends on BACKLIGHT_CLASS_DEVICE
>         depends on INPUT
>         depends on MACH_LOONGSON64
> --

Applied as 6.13-rc material, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index d65cd08ba8e1..d81b55f5068c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -135,10 +135,10 @@  config ACPI_REV_OVERRIDE_POSSIBLE
 config ACPI_EC
 	bool "Embedded Controller"
 	depends on HAS_IOPORT
-	default X86
+	default X86 || LOONGARCH
 	help
 	  This driver handles communication with the microcontroller
-	  on many x86 laptops and other machines.
+	  on many x86/LoongArch laptops and other machines.
 
 config ACPI_EC_DEBUGFS
 	tristate "EC read/write access through /sys/kernel/debug/ec"
diff --git a/drivers/platform/loongarch/Kconfig b/drivers/platform/loongarch/Kconfig
index 5633e4d73991..447528797d07 100644
--- a/drivers/platform/loongarch/Kconfig
+++ b/drivers/platform/loongarch/Kconfig
@@ -18,7 +18,7 @@  if LOONGARCH_PLATFORM_DEVICES
 
 config LOONGSON_LAPTOP
 	tristate "Generic Loongson-3 Laptop Driver"
-	depends on ACPI
+	depends on ACPI_EC
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on INPUT
 	depends on MACH_LOONGSON64