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)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 8 Aug 2024 11:56:44 +0000 (14:56 +0300)
commitcde7886b35176d56e72bfc68dc104fa08e7b072c
treece7f3041f2b4bdc00f21db400bab4f998fac28e7
parent613e3900c24bb1379d994f44d75d31c3223cc263
platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc

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>
drivers/platform/x86/Kconfig
drivers/platform/x86/ideapad-laptop.c
drivers/platform/x86/ideapad-laptop.h
drivers/platform/x86/lenovo-ymc.c