Skip to content

Commit 44e94fe

Browse files
superm1rafaeljw
authored andcommitted
platform/x86/amd: pmf: Add 'quiet' to hidden choices
When amd-pmf and asus-wmi are both bound no low power option shows up in sysfs. Add a hidden choice for amd-pmf to support 'quiet' mode to let both bind. Fixes: 6888347 ("ACPI: platform_profile: Allow multiple handlers") Suggested-by: Antheas Kapenekakis <lkml@antheas.dev> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Tested-by: Antheas Kapenekakis <lkml@antheas.dev> Tested-by: Derek J. Clark <derekjohn.clark@gmail.com> Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://patch.msgid.link/20250228170155.2623386-3-superm1@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 778b94d commit 44e94fe

File tree

1 file changed

+9
-0
lines changed
  • drivers/platform/x86/amd/pmf

1 file changed

+9
-0
lines changed

drivers/platform/x86/amd/pmf/sps.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf)
303303
mode = POWER_MODE_BALANCED_POWER;
304304
break;
305305
case PLATFORM_PROFILE_LOW_POWER:
306+
case PLATFORM_PROFILE_QUIET:
306307
mode = POWER_MODE_POWER_SAVER;
307308
break;
308309
default:
@@ -387,6 +388,13 @@ static int amd_pmf_profile_set(struct device *dev,
387388
return 0;
388389
}
389390

391+
static int amd_pmf_hidden_choices(void *drvdata, unsigned long *choices)
392+
{
393+
set_bit(PLATFORM_PROFILE_QUIET, choices);
394+
395+
return 0;
396+
}
397+
390398
static int amd_pmf_profile_probe(void *drvdata, unsigned long *choices)
391399
{
392400
set_bit(PLATFORM_PROFILE_LOW_POWER, choices);
@@ -398,6 +406,7 @@ static int amd_pmf_profile_probe(void *drvdata, unsigned long *choices)
398406

399407
static const struct platform_profile_ops amd_pmf_profile_ops = {
400408
.probe = amd_pmf_profile_probe,
409+
.hidden_choices = amd_pmf_hidden_choices,
401410
.profile_get = amd_pmf_profile_get,
402411
.profile_set = amd_pmf_profile_set,
403412
};

0 commit comments

Comments
 (0)