This series of patches adds support for Acer Predator PHN16-71 in acer-wmi
including platform profile, (thermal) mode key and fan speed monitoring.
The acer-wmi driver already includes fan control and turbo mode support
for gaming laptops that use predator sense app (version 3), but PHN16-71
operates in different way with new predator sense (version 4).
To distinguish from implementation for previous model, new implementation
for this device is marked with "v4".
Changes in v4:
- add new patch for "ACPI_VIDEO" in Kconfig
- use GENMASK and FIELD_GET to read fan speed
- clean up code
Changes in v3:
- change dependencies in Kconfig
Changes in v2:
- fix typo
- remove redundant "if" statement
SungHwan Jung (3):
platform/x86: acer-wmi: Add platform profile and mode key support for
Predator PHN16-71
platform/x86: acer-wmi: add fan speed monitoring for Predator
PHN16-71
platform/x86: acer-wmi: Fix recursive dependency for acer-wmi
drivers/platform/x86/Kconfig | 3 +-
drivers/platform/x86/acer-wmi.c | 368 +++++++++++++++++++++++++++++++-
2 files changed, 369 insertions(+), 2 deletions(-)
--
2.43.0
"select ACPI_VIDEO" cause recursive dependency when "depends on HWMON"
is added.
---build log
drivers/hwmon/Kconfig:6:error: recursive dependency detected!
drivers/hwmon/Kconfig:6: symbol HWMON is selected by EEEPC_LAPTOP
drivers/platform/x86/Kconfig:326: symbol EEEPC_LAPTOP depends on ACPI_VIDEO
drivers/acpi/Kconfig:208: symbol ACPI_VIDEO is selected by ACER_WMI
drivers/platform/x86/Kconfig:173: symbol ACER_WMI depends on HWMON
---
It is not recommended to use "select" for visible symbol, "select" has changed
to "depends on".
This patch depends on "platform/x86: acer-wmi: add fan speed monitoring
for Predator PHN16-71"
Signed-off-by: SungHwan Jung <[email protected]>
---
drivers/platform/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index caf3f4c6b..33ddb644e 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -178,7 +178,7 @@ config ACER_WMI
depends on RFKILL || RFKILL = n
depends on ACPI_WMI
depends on HWMON
- select ACPI_VIDEO
+ depends on ACPI_VIDEO
select INPUT_SPARSEKMAP
select LEDS_CLASS
select NEW_LEDS
--
2.43.0
Hi,
On 11/24/23 10:41, SungHwan Jung wrote:
> "select ACPI_VIDEO" cause recursive dependency when "depends on HWMON"
> is added.
>
> ---build log
> drivers/hwmon/Kconfig:6:error: recursive dependency detected!
> drivers/hwmon/Kconfig:6: symbol HWMON is selected by EEEPC_LAPTOP
> drivers/platform/x86/Kconfig:326: symbol EEEPC_LAPTOP depends on ACPI_VIDEO
> drivers/acpi/Kconfig:208: symbol ACPI_VIDEO is selected by ACER_WMI
> drivers/platform/x86/Kconfig:173: symbol ACER_WMI depends on HWMON
> ---
>
> It is not recommended to use "select" for visible symbol, "select" has changed
> to "depends on".
>
> This patch depends on "platform/x86: acer-wmi: add fan speed monitoring
> for Predator PHN16-71"
>
> Signed-off-by: SungHwan Jung <[email protected]>
This patch should come before the patch adding the "depends on HWMON",
to avoid a bisect ending up with patch 2/3 applied without patch 3/3
applied and thus picking a non building commit.
Also there is a stub defined for the used acpi_video_get_backlight_type()
function when ACPI_VIDEO is not set, so this can use:
depends on ACPI_VIDEO || ACPI_VIDEO = n
I have changed the order of the patches for this patch to be before
the patch adding the hwmon support and I've updated the depends as
mentioned above while merging this:
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index caf3f4c6b..33ddb644e 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -178,7 +178,7 @@ config ACER_WMI
> depends on RFKILL || RFKILL = n
> depends on ACPI_WMI
> depends on HWMON
> - select ACPI_VIDEO
> + depends on ACPI_VIDEO
> select INPUT_SPARSEKMAP
> select LEDS_CLASS
> select NEW_LEDS