]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc
authorGergo Koteles <soyer@irl.hu>
Thu, 25 Jul 2024 09:21:08 +0000 (11:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2024 04:05:39 +0000 (06:05 +0200)
commitfc6c6bb34f5dad28c1edba0625f1249f272a89b2
tree1ccd135ff5540d11ae8cb718fb00aad2e9394289
parentc0d39578c35e1df980c1295ac7f8ad4493d7f08d
platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc

[ Upstream commit cde7886b35176d56e72bfc68dc104fa08e7b072c ]

Some models need to trigger the EC after each YMC event for the yoga
mode control to work properly. EC triggering consist of a VPC call from
the lenovo-ymc module. Except for this, all VPC calls are in the
ideapad-laptop module.

Since ideapad-laptop has a notification chain, a new YMC_EVENT action
can be added and triggered from the lenovo-ymc module. Then the
ideapad-laptop can trigger the EC.

If the triggering is in the ideapad-laptop module, then the ec_trigger
module parameter should be there as well.

Move the ymc_trigger_ec functionality and the ec_trigger module
parameter to the ideapad-laptop module.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/d980ab3ac32b5e554f456b0ff17279bfdbe2a203.1721898747.git.soyer@irl.hu
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Stable-dep-of: 7cc06e729460 ("platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/Kconfig
drivers/platform/x86/ideapad-laptop.c
drivers/platform/x86/ideapad-laptop.h
drivers/platform/x86/lenovo-ymc.c