platform/x86/fujitsu-laptop: Add battery charge control support
authorSzilard Fabian <szfabian@bluemarch.art>
Thu, 15 Feb 2024 20:31:43 +0000 (20:31 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 27 Feb 2024 12:43:55 +0000 (14:43 +0200)
commit14c8a1451810cf616c959574bee4fad246f3a0cb
tree3272b540fe74efd950ce4feb8be0feba43a0be8c
parent301c1904d638ea9f9c9da34952a63faa5ceed26b
platform/x86/fujitsu-laptop: Add battery charge control support

This patch adds battery charge control support on Fujitsu notebooks
via the S006 method of the FUJ02E3 ACPI device. With this method it's
possible to set charge_control_end_threshold between 50 and 100%.

Tested on Lifebook E5411 and Lifebook U728. Sadly I can't test this
patch on a dual battery one, but I didn't find any clue about
independent battery charge control on dual battery Fujitsu notebooks
either. And by that I mean checking the DSDT table of various Lifebook
notebooks and reverse engineering FUJ02E3.dll.

Signed-off-by: Szilard Fabian <szfabian@bluemarch.art>
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Link: https://lore.kernel.org/r/20240215203012.228758-2-szfabian@bluemarch.art
[ij: coding style cleanups.]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/fujitsu-laptop.c