Re: [PATCH] platform/chrome: cros_ec_lpc: Move host command to prepare/complete

From: Tzung-Bi Shih
Date: Mon May 15 2023 - 02:08:10 EST


On Fri, May 12, 2023 at 11:35:57AM -0600, Tim Van Patten wrote:
> Update cros_ec_lpc_pm_ops to call cros_ec_lpc_prepare() during PM
> .prepare() and cros_ec_lpc_complete() during .complete(). This moves the
> host command that the AP sends and allows the EC to log entry/exit of
> AP's suspend/resume more accurately.

This is an old series. It should preserve the version number and change logs
(at least until v8[5]).

Went through the series again, and put all concerns together:

* Should it print more logs during suspend/resume? See v1[1].
* Which is more like local patches for debugging some specific issues.

* Should it move the callbacks? See v2[2].
* Is it appropriate to call cros_ec_suspend() when PM is still in prepare
phase and call cros_ec_resume() when PM is already in complete phase?

* Should it print return value of cros_ec_resume()? See v3[3] and v7[4].
* By referencing other use cases, they just defer it to PM.

[1]: https://patchwork.kernel.org/project/chrome-platform/patch/20220701095421.1.I78ded92e416b55de31975686d34b2058d4761c07@changeid/
[2]: https://patchwork.kernel.org/project/chrome-platform/patch/20220706205136.v2.1.Ic7a7c81f880ab31533652e0928aa6e687bb268b5@changeid/
[3]: https://patchwork.kernel.org/project/chrome-platform/patch/20220802113957.v3.1.I2c8c550183162e7594309b66d19af696b8d84552@changeid/
[4]: https://patchwork.kernel.org/project/chrome-platform/patch/20220823095915.v7.1.I55189adfdb8d025fc991a0fa820ec09078619b15@changeid/
[5]: https://patchwork.kernel.org/project/chrome-platform/patch/20221028171820.v8.1.I55189adfdb8d025fc991a0fa820ec09078619b15@changeid/

> Signed-off-by: Tim Van Patten <timvp@xxxxxxxxxxxx>
> Reviewed-by: Raul E Rangel <rrangel@xxxxxxxxxxxx>
> Signed-off-by: Tim Van Patten <timvp@xxxxxxxxxx>

It shouldn't need duplicate S-o-b.