All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajat Jain <rajatja@google.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Wolfram Sang <wsa@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, dtor@google.com
Cc: Derek Basehore <dbasehore@chromium.org>,
	rajatxjain@gmail.com, Rajat Jain <rajatja@google.com>
Subject: [PATCH 3/3] i2c: enable async suspend/resume on i2c client devices
Date: Mon, 25 Oct 2021 14:35:31 -0700	[thread overview]
Message-ID: <20211025213532.2349161-4-rajatja@google.com> (raw)
In-Reply-To: <20211025213532.2349161-1-rajatja@google.com>

From: Derek Basehore <dbasehore@chromium.org>

This enables the async suspend for i2c client devices. This reduces
the suspend/resume time considerably on platforms where i2c devices
can take a lot of time (hundreds of ms) to resume.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Rajat Jain <rajatja@google.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
v2: Add Jarkko's tested by

 drivers/i2c/i2c-core-base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 8d4f2be54e17..70d32efb68ef 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1047,6 +1047,7 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
 	client->dev.of_node = of_node_get(info->of_node);
 	client->dev.fwnode = info->fwnode;
 
+	device_enable_async_suspend(&client->dev);
 	i2c_dev_set_name(adap, client, info);
 
 	if (info->swnode) {
-- 
2.33.0.1079.g6e70778dc9-goog


  parent reply	other threads:[~2021-10-25 21:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 21:35 [PATCH v2 0/3] i2c: Enable asynchronous suspend/resume Rajat Jain
2021-10-25 21:35 ` [PATCH v2 1/3] i2c: designware: Enable async suspend / resume of designware devices Rajat Jain
2021-11-29 16:51   ` Wolfram Sang
2021-10-25 21:35 ` [PATCH 2/3] i2c: enable async suspend/resume for i2c adapters Rajat Jain
2021-11-29 16:51   ` Wolfram Sang
2021-10-25 21:35 ` Rajat Jain [this message]
2021-11-29 16:51   ` [PATCH 3/3] i2c: enable async suspend/resume on i2c client devices Wolfram Sang
2021-11-29 16:48 ` [PATCH v2 0/3] i2c: Enable asynchronous suspend/resume Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2021-10-22  2:28 [PATCH 0/3] i2c: Enable async resume for i2c devices Rajat Jain
2021-10-22  2:28 ` [PATCH 3/3] i2c: enable async suspend/resume on i2c client devices Rajat Jain

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=20211025213532.2349161-4-rajatja@google.com \
    --to=rajatja@google.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dbasehore@chromium.org \
    --cc=dtor@google.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rajatxjain@gmail.com \
    --cc=wsa@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.