Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5020513ybl; Mon, 26 Aug 2019 21:04:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5Qy7Dep3/pFzVpaN8qErLrARxNnZofGWVbygc/UzEP5zmnNkOlNtIQcM96xc/BenTKlBK X-Received: by 2002:a62:86cf:: with SMTP id x198mr24041797pfd.195.1566878653504; Mon, 26 Aug 2019 21:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566878653; cv=none; d=google.com; s=arc-20160816; b=ypahJ0ub+IEKCAW5fvJxj4F5VaYVsO3ha9qkUHr4I+HOQBCMQT6yR+7dz+ORFLvFSn 4WYMKrCd7PBPUssLr99qa79oqpUlk4XKnuwtsNCypy9kHJr52zQCqN4tfwBWCOAR0HEJ 5K9wWKDeV3iZ2SNisPlY5zUJ1Xr2uk+ThnBwMzSDn2veR0poM4QQjhud1Vjsua18W9hy uI9XwvpiBRtbyS+95aSI0dms8gMvjM9ddIYxBatIjl07VGO6t24N7+JdWtgVklBP0aFV CFgB/aQUfFfXWtD+qS0RqgLSpwejdnLZ/CvpSzFqVO9gh4C4Bbcz9+YN5P0+ILpaAYhW 1xdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=n/ISg4lPBXntnhkUlyyoIOqftCgr4zrKHSEP3Z3lTkY=; b=0QLDKhxzB/3+pQ0baC2S4VF2en4lDRXfssmCmEF/6IK9xh/2vnbWXUNV87GHdYYkJc QwWqA4qLoEVq5+vn3QELsLD7+QW7MkHX32xXURCR/MuNu6YgLwqxwnXqlaeXesG8G8gK 6di1ho1TR2A/0bU3G6OKLvk6em/XZq3s/e/DVM8WweQjMR4NNfdTVszDjbUmr1Cc7a+Z m6aeQz4jwcjNhqJsYOXZS5+HDbNzVd/5DEORhoU3RQq01toMYZxRLp5Q5bMyQCZnYKjv dBYMkjY4T96xx6iAsdFSZGNLamv2bfZNJ+FmCMzxzYBOE0T2scsch4dnyB/vBf0qIlA/ 65Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KsGWP3iJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si11934121pld.75.2019.08.26.21.03.56; Mon, 26 Aug 2019 21:04:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KsGWP3iJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725904AbfH0ECZ (ORCPT + 99 others); Tue, 27 Aug 2019 00:02:25 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42000 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfH0ECZ (ORCPT ); Tue, 27 Aug 2019 00:02:25 -0400 Received: by mail-ed1-f66.google.com with SMTP id m44so29389417edd.9 for ; Mon, 26 Aug 2019 21:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n/ISg4lPBXntnhkUlyyoIOqftCgr4zrKHSEP3Z3lTkY=; b=KsGWP3iJylxhOlKZ6vSysfwN+OptsHE8knF2cvoVVQessQgg7RCX1qZ1y3ImlXhxl1 JDPKsbQx+Po9Ard+CtUl/d4YEtNv0VgoA3YwppD2JZlVL7cclGKAQiDh1VuQHSC+lxgK 6TFvVKK/Vr7H0oMOyO8pbA1TNpEjgQVOpKg2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n/ISg4lPBXntnhkUlyyoIOqftCgr4zrKHSEP3Z3lTkY=; b=B1/wCA6rueyvFJQMwwnZR2jDWULL4Rfatoqdnva6f7h3JHRnvdDlt4vuEKO72BEfmg Xgq1vS6kVTJEZXSONdxeGpH4yt4d5pnJXGaTMHhs77BmJPFcS1WpJpNmDyyG/oW125HO 3fNBhSC7tTwJ9Cm+ShCRvv+QotdvWvamxMb9GrOZ6Drz0a353yMxWH24G02/Y4ZsZdZu GNWove7VawORxpfymOvaMEvXWXGaB1uwuq6XUpoqvBK4qWCOpspyeUSBq/bnfpa9yLTM fy9QqZCnGOAUGDmcWDoWTHfF+zU7HWABV+pMmIXZY9flyghlMz2FwvD+pu7X34v6TDAa LqgA== X-Gm-Message-State: APjAAAWyQtclD4valC4ylPtNUgfU+4/3ubF7+aQ/bSMKI+teDh32pK18 sy12sX2uKDPPYndaz8jdTwaiOu28a8FlfuTNCFsqGQ== X-Received: by 2002:a50:9736:: with SMTP id c51mr22130503edb.160.1566878543433; Mon, 26 Aug 2019 21:02:23 -0700 (PDT) MIME-Version: 1.0 References: <20190814081757.65056-1-yllin@chromium.org> <2dae986a-17c4-f06d-c7c9-47c93132f4aa@collabora.com> In-Reply-To: <2dae986a-17c4-f06d-c7c9-47c93132f4aa@collabora.com> From: Pi-Hsun Shih Date: Tue, 27 Aug 2019 12:01:47 +0800 Message-ID: Subject: Re: [PATCH] platform/chrome: cros_ec_rpmsg: Add host command AP sleep state support To: Enric Balletbo i Serra Cc: Yilun Lin , LKML , Guenter Roeck , Benson Leung , Laurent Pinchart Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested that with this patch, SCP does receive host command from AP while AP goes to suspend and back. Tested-by: Pi-Hsun Shih On Fri, Aug 23, 2019 at 3:36 AM Enric Balletbo i Serra wrote: > > Hi, > > On 14/8/19 10:17, Yilun Lin wrote: > > Add EC host command to inform EC of AP suspend/resume status. > > > > Signed-off-by: Yilun Lin > > The patch looks good to me but as I don't have the hardware to test this, could > I get a Tested-by Pi-Hsun if possible before queuing in chrome-platform-5.4 > > Thanks, > Enric > > > --- > > > > drivers/platform/chrome/cros_ec_rpmsg.c | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/drivers/platform/chrome/cros_ec_rpmsg.c b/drivers/platform/chrome/cros_ec_rpmsg.c > > index 5d3fb2abad1d..6f34fe629e2c 100644 > > --- a/drivers/platform/chrome/cros_ec_rpmsg.c > > +++ b/drivers/platform/chrome/cros_ec_rpmsg.c > > @@ -236,6 +236,25 @@ static void cros_ec_rpmsg_remove(struct rpmsg_device *rpdev) > > cancel_work_sync(&ec_rpmsg->host_event_work); > > } > > > > +#ifdef CONFIG_PM_SLEEP > > +static int cros_ec_rpmsg_suspend(struct device *dev) > > +{ > > + struct cros_ec_device *ec_dev = dev_get_drvdata(dev); > > + > > + return cros_ec_suspend(ec_dev); > > +} > > + > > +static int cros_ec_rpmsg_resume(struct device *dev) > > +{ > > + struct cros_ec_device *ec_dev = dev_get_drvdata(dev); > > + > > + return cros_ec_resume(ec_dev); > > +} > > +#endif > > + > > +static SIMPLE_DEV_PM_OPS(cros_ec_rpmsg_pm_ops, cros_ec_rpmsg_suspend, > > + cros_ec_rpmsg_resume); > > + > > static const struct of_device_id cros_ec_rpmsg_of_match[] = { > > { .compatible = "google,cros-ec-rpmsg", }, > > { } > > @@ -246,6 +265,7 @@ static struct rpmsg_driver cros_ec_driver_rpmsg = { > > .drv = { > > .name = "cros-ec-rpmsg", > > .of_match_table = cros_ec_rpmsg_of_match, > > + .pm = &cros_ec_rpmsg_pm_ops, > > }, > > .probe = cros_ec_rpmsg_probe, > > .remove = cros_ec_rpmsg_remove, > >