From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: "Łukasz Bartosik" <ukaszb@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lee Jones <lee@kernel.org>, Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Pavan Holla <pholla@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
linux-usb@vger.kernel.org, chrome-platform@lists.linux.dev
Subject: Re: [PATCH v6 4/8] usb: typec: cros_ec_ucsi: Use complete instead of resume
Date: Wed, 11 Sep 2024 16:20:55 +0300 [thread overview]
Message-ID: <ZuGZNyJkIreUhoc0@kuha.fi.intel.com> (raw)
In-Reply-To: <20240910101527.603452-5-ukaszb@chromium.org>
Hi Łukasz,
On Tue, Sep 10, 2024 at 10:15:23AM +0000, Łukasz Bartosik wrote:
> From: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
>
> On platforms using cros_ec_lpc, resume is split into .resume_early and
> .complete. To avoid missing EC events, use .complete to schedule work
> when resuming.
>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org>
> ---
> drivers/usb/typec/ucsi/cros_ec_ucsi.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/typec/ucsi/cros_ec_ucsi.c b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> index 20e608097fc6..422b3b14028c 100644
> --- a/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> +++ b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> @@ -241,15 +241,18 @@ static int __maybe_unused cros_ucsi_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused cros_ucsi_resume(struct device *dev)
> +static void __maybe_unused cros_ucsi_complete(struct device *dev)
> {
> struct cros_ucsi_data *udata = dev_get_drvdata(dev);
> -
> - return ucsi_resume(udata->ucsi);
> + ucsi_resume(udata->ucsi);
> }
>
> -static SIMPLE_DEV_PM_OPS(cros_ucsi_pm_ops, cros_ucsi_suspend,
> - cros_ucsi_resume);
> +static const struct dev_pm_ops cros_ucsi_pm_ops = {
> +#ifdef CONFIG_PM_SLEEP
> + .suspend = cros_ucsi_suspend,
> + .complete = cros_ucsi_complete,
> +#endif
> +};
>
> static const struct platform_device_id cros_ucsi_id[] = {
> { KBUILD_MODNAME, 0 },
Please merge this into the previous patch.
thanks,
--
heikki
next prev parent reply other threads:[~2024-09-11 13:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 10:15 [PATCH v6 0/8] usb: typec: Implement UCSI driver for ChromeOS Łukasz Bartosik
2024-09-10 10:15 ` [PATCH v6 1/8] platform/chrome: Update ChromeOS EC header for UCSI Łukasz Bartosik
2024-09-18 6:32 ` Tzung-Bi Shih
2024-09-10 10:15 ` [PATCH v6 2/8] platform/chrome: Update EC feature flags Łukasz Bartosik
2024-09-18 6:32 ` Tzung-Bi Shih
2024-10-11 7:27 ` Lee Jones
2024-10-11 9:17 ` Łukasz Bartosik
2024-10-15 9:10 ` (subset) " Lee Jones
2024-09-10 10:15 ` [PATCH v6 3/8] usb: typec: ucsi: Implement ChromeOS UCSI driver Łukasz Bartosik
2024-09-12 12:58 ` Dmitry Baryshkov
2024-09-14 22:50 ` Łukasz Bartosik
2024-09-14 23:03 ` Dmitry Baryshkov
2024-09-14 23:43 ` Łukasz Bartosik
2024-09-10 10:15 ` [PATCH v6 4/8] usb: typec: cros_ec_ucsi: Use complete instead of resume Łukasz Bartosik
2024-09-11 13:20 ` Heikki Krogerus [this message]
2024-09-14 21:50 ` Łukasz Bartosik
2024-09-10 10:15 ` [PATCH v6 5/8] usb: typec: cros_ec_ucsi: Add trace events Łukasz Bartosik
2024-09-11 13:36 ` Heikki Krogerus
2024-09-14 21:52 ` Łukasz Bartosik
2024-09-19 12:52 ` Heikki Krogerus
2024-09-19 18:10 ` Łukasz Bartosik
2024-09-10 10:15 ` [PATCH v6 6/8] usb: typec: cros_ec_ucsi: Add netlink Łukasz Bartosik
2024-09-11 14:00 ` kernel test robot
2024-09-11 14:07 ` Heikki Krogerus
2024-09-14 22:08 ` Łukasz Bartosik
2024-09-19 9:38 ` Heikki Krogerus
2024-09-19 18:03 ` Łukasz Bartosik
2024-09-19 20:00 ` Dmitry Baryshkov
2024-09-23 14:42 ` Łukasz Bartosik
2024-09-21 7:11 ` kernel test robot
2024-09-10 10:15 ` [PATCH v6 7/8] mfd: cros_ec: Load cros_ec_ucsi on supported ECs Łukasz Bartosik
2024-09-10 10:15 ` [PATCH v6 8/8] mfd: cros_ec: Don't load charger with UCSI Łukasz Bartosik
2024-10-09 10:11 ` (subset) " Lee Jones
2024-10-09 10:11 ` (subset) [PATCH v6 0/8] usb: typec: Implement UCSI driver for ChromeOS Lee Jones
2024-10-15 9:10 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZuGZNyJkIreUhoc0@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=abhishekpandit@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=lee@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pholla@chromium.org \
--cc=tzungbi@kernel.org \
--cc=ukaszb@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox