aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Lubart <[email protected]>2022-09-08 00:51:09 +0300
committerJoonas Lahtinen <[email protected]>2022-09-12 15:23:11 +0300
commitbc9abe0ef1bdd47b6770f4c6e6ac7ca68a7d8997 (patch)
tree8ac427f09df3cbd00ed3894d5cd0c14c20e9595d
parent342e4c7e2d38e421f99898b629b5d82e5ae90323 (diff)
mei: gsc: add transition to PXP mode in resume flow
Added transition to PXP mode in resume flow. CC: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Vitaly Lubart <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Reviewed-by: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Joonas Lahtinen <[email protected]>
-rw-r--r--drivers/misc/mei/gsc-me.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/mei/gsc-me.c b/drivers/misc/mei/gsc-me.c
index 6b22726aed55..75765e4df4ed 100644
--- a/drivers/misc/mei/gsc-me.c
+++ b/drivers/misc/mei/gsc-me.c
@@ -182,11 +182,22 @@ static int __maybe_unused mei_gsc_pm_suspend(struct device *device)
static int __maybe_unused mei_gsc_pm_resume(struct device *device)
{
struct mei_device *dev = dev_get_drvdata(device);
+ struct auxiliary_device *aux_dev;
+ struct mei_aux_device *adev;
int err;
+ struct mei_me_hw *hw;
if (!dev)
return -ENODEV;
+ hw = to_me_hw(dev);
+ aux_dev = to_auxiliary_dev(device);
+ adev = auxiliary_dev_to_mei_aux_dev(aux_dev);
+ if (adev->ext_op_mem.start) {
+ mei_gsc_set_ext_op_mem(hw, &adev->ext_op_mem);
+ dev->pxp_mode = MEI_DEV_PXP_INIT;
+ }
+
err = mei_restart(dev);
if (err)
return err;