* [PATCH] platform/x86: lenovo: gamezone needs "other mode"
@ 2025-07-09 15:17 Arnd Bergmann
2025-07-11 14:55 ` Ilpo Järvinen
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-07-09 15:17 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Armin Wolf
Cc: Arnd Bergmann, Alok Tiwari, Mario Limonciello, Jelle van der Waa,
platform-driver-x86, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Registering the "other mode" notifier fails if that is disabled:
x86_64-linux-ld: drivers/platform/x86/lenovo/wmi-gamezone.o: in function `lwmi_gz_probe':
wmi-gamezone.c:(.text+0x336): undefined reference to `devm_lwmi_om_register_notifier'
This could be fixed by adding a stub helper, but a Kconfig 'select'
seems simpler here.
Fixes: 22024ac5366f ("platform/x86: Add Lenovo Gamezone WMI Driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/platform/x86/lenovo/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
index b76157b35296..e9e1c3268373 100644
--- a/drivers/platform/x86/lenovo/Kconfig
+++ b/drivers/platform/x86/lenovo/Kconfig
@@ -250,8 +250,7 @@ config LENOVO_WMI_GAMEZONE
depends on ACPI_WMI
depends on DMI
select ACPI_PLATFORM_PROFILE
- select LENOVO_WMI_EVENTS
- select LENOVO_WMI_HELPERS
+ select LENOVO_WMI_TUNING
help
Say Y here if you have a WMI aware Lenovo Legion device and would like to use the
platform-profile firmware interface to manage power usage.
--
2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: lenovo: gamezone needs "other mode"
2025-07-09 15:17 [PATCH] platform/x86: lenovo: gamezone needs "other mode" Arnd Bergmann
@ 2025-07-11 14:55 ` Ilpo Järvinen
2025-07-11 15:09 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2025-07-11 14:55 UTC (permalink / raw)
To: Arnd Bergmann, Derek J. Clark
Cc: Mark Pearson, Hans de Goede, Armin Wolf, Arnd Bergmann,
Alok Tiwari, Mario Limonciello, Jelle van der Waa,
platform-driver-x86, LKML
On Wed, 9 Jul 2025, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Registering the "other mode" notifier fails if that is disabled:
>
> x86_64-linux-ld: drivers/platform/x86/lenovo/wmi-gamezone.o: in function `lwmi_gz_probe':
> wmi-gamezone.c:(.text+0x336): undefined reference to `devm_lwmi_om_register_notifier'
>
> This could be fixed by adding a stub helper, but a Kconfig 'select'
> seems simpler here.
>
> Fixes: 22024ac5366f ("platform/x86: Add Lenovo Gamezone WMI Driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/platform/x86/lenovo/Kconfig | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
> index b76157b35296..e9e1c3268373 100644
> --- a/drivers/platform/x86/lenovo/Kconfig
> +++ b/drivers/platform/x86/lenovo/Kconfig
> @@ -250,8 +250,7 @@ config LENOVO_WMI_GAMEZONE
> depends on ACPI_WMI
> depends on DMI
> select ACPI_PLATFORM_PROFILE
> - select LENOVO_WMI_EVENTS
> - select LENOVO_WMI_HELPERS
> + select LENOVO_WMI_TUNING
Why did you remove the other two?
Do select propagate properly these days across another select? I was under
impression they don't which is one of the reasons use of select is
discouraged.
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: lenovo: gamezone needs "other mode"
2025-07-11 14:55 ` Ilpo Järvinen
@ 2025-07-11 15:09 ` Arnd Bergmann
2025-07-11 15:34 ` Ilpo Järvinen
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-07-11 15:09 UTC (permalink / raw)
To: Ilpo Järvinen, Arnd Bergmann, Derek J. Clark
Cc: Mark Pearson, Hans de Goede, Armin Wolf, ALOK TIWARI,
Mario Limonciello, Jelle van der Waa, platform-driver-x86, LKML
On Fri, Jul 11, 2025, at 16:55, Ilpo Järvinen wrote:
> On Wed, 9 Jul 2025, Arnd Bergmann wrote:
>> index b76157b35296..e9e1c3268373 100644
>> --- a/drivers/platform/x86/lenovo/Kconfig
>> +++ b/drivers/platform/x86/lenovo/Kconfig
>> @@ -250,8 +250,7 @@ config LENOVO_WMI_GAMEZONE
>> depends on ACPI_WMI
>> depends on DMI
>> select ACPI_PLATFORM_PROFILE
>> - select LENOVO_WMI_EVENTS
>> - select LENOVO_WMI_HELPERS
>> + select LENOVO_WMI_TUNING
>
> Why did you remove the other two?
>
> Do select propagate properly these days across another select?
Yes, as far as I know it has always done this, with the one
exception that it does not propagate when trying to select
another symbol that has missing dependencies
> I was under impression they don't which is one of the reasons
> use of select is discouraged.
I have seen that mentioned before in commit logs, but I
think this was a misunderstanding. Using 'select' is still
discouraged, but for other reasons:
- complexity quickly gets out of hand when selecting something
that has other dependencies, as the driver selecting them
must duplicate all those dependencies and keep them in sync
- mixing 'depends on' and 'select' for the same dependency
in different drivers tends to cause dependency loops
- selecting user-visible symbols has side-effects if another
symbol depends on that, e.g. the "select I2C" in some subsystems
causes the I2C submenu to appear.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: lenovo: gamezone needs "other mode"
2025-07-11 15:09 ` Arnd Bergmann
@ 2025-07-11 15:34 ` Ilpo Järvinen
2025-07-11 15:36 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2025-07-11 15:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Derek J. Clark, Mark Pearson, Hans de Goede,
Armin Wolf, ALOK TIWARI, Mario Limonciello, Jelle van der Waa,
platform-driver-x86, LKML
[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]
On Fri, 11 Jul 2025, Arnd Bergmann wrote:
> On Fri, Jul 11, 2025, at 16:55, Ilpo Järvinen wrote:
> > On Wed, 9 Jul 2025, Arnd Bergmann wrote:
> >> index b76157b35296..e9e1c3268373 100644
> >> --- a/drivers/platform/x86/lenovo/Kconfig
> >> +++ b/drivers/platform/x86/lenovo/Kconfig
> >> @@ -250,8 +250,7 @@ config LENOVO_WMI_GAMEZONE
> >> depends on ACPI_WMI
> >> depends on DMI
> >> select ACPI_PLATFORM_PROFILE
> >> - select LENOVO_WMI_EVENTS
> >> - select LENOVO_WMI_HELPERS
> >> + select LENOVO_WMI_TUNING
> >
> > Why did you remove the other two?
> >
> > Do select propagate properly these days across another select?
>
> Yes, as far as I know it has always done this, with the one
> exception that it does not propagate when trying to select
> another symbol that has missing dependencies
>
> > I was under impression they don't which is one of the reasons
> > use of select is discouraged.
>
> I have seen that mentioned before in commit logs, but I
> think this was a misunderstanding. Using 'select' is still
> discouraged, but for other reasons:
>
> - complexity quickly gets out of hand when selecting something
> that has other dependencies, as the driver selecting them
> must duplicate all those dependencies and keep them in sync
Okay, thanks for these clarifications.
I think I'll take this patch but change it to still keep the other selects
as wmi-gamezone.c is directly using those too anyway.
> - mixing 'depends on' and 'select' for the same dependency
> in different drivers tends to cause dependency loops
>
> - selecting user-visible symbols has side-effects if another
> symbol depends on that, e.g. the "select I2C" in some subsystems
> causes the I2C submenu to appear.
>
> Arnd
>
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: lenovo: gamezone needs "other mode"
2025-07-11 15:34 ` Ilpo Järvinen
@ 2025-07-11 15:36 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2025-07-11 15:36 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Arnd Bergmann, Derek J. Clark, Mark Pearson, Hans de Goede,
Armin Wolf, ALOK TIWARI, Mario Limonciello, Jelle van der Waa,
platform-driver-x86, LKML
On Fri, Jul 11, 2025, at 17:34, Ilpo Järvinen wrote:
> On Fri, 11 Jul 2025, Arnd Bergmann wrote:
> I think I'll take this patch but change it to still keep the other selects
> as wmi-gamezone.c is directly using those too anyway.
Sounds good to me, thanks!
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-11 15:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09 15:17 [PATCH] platform/x86: lenovo: gamezone needs "other mode" Arnd Bergmann
2025-07-11 14:55 ` Ilpo Järvinen
2025-07-11 15:09 ` Arnd Bergmann
2025-07-11 15:34 ` Ilpo Järvinen
2025-07-11 15:36 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®