]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/loongarch: laptop: Add backlight power control support
authorYao Zi <ziyao@disroot.org>
Thu, 5 Jun 2025 12:34:46 +0000 (20:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:40 +0000 (11:07 +0100)
commite347edbf562925a144655be69a67748095c93c4d
tree2cd0c46e78938b926a75a77ba7b179a205b4d9d4
parent5db2538e8d6f31c604618063c8ade013914a2951
platform/loongarch: laptop: Add backlight power control support

commit 53c762b47f726e4079a1f06f684bce2fc0d56fba upstream.

loongson_laptop_turn_{on,off}_backlight() are designed for controlling
the power of the backlight, but they aren't really used in the driver
previously.

Unify these two functions since they only differ in arguments passed to
ACPI method, and wire up loongson_laptop_backlight_update() to update
the power state of the backlight as well. Tested on the TongFang L860-T2
Loongson-3A5000 laptop.

Cc: stable@vger.kernel.org
Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/loongarch/loongson-laptop.c