Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1252995pxb; Thu, 21 Oct 2021 19:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/JQNSLL+e0WknvIsv+0toF05fLq9YUupbs7Tb1r1q8fjpkfBHOhasVhq8BguZrmOMTS31 X-Received: by 2002:a17:906:d196:: with SMTP id c22mr11462235ejz.231.1634869991781; Thu, 21 Oct 2021 19:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634869991; cv=none; d=google.com; s=arc-20160816; b=n6q3cMGlvPBvcbB/BdLTRmzuu81fr8RSUYWXkKExEtE93SkFyvaND8LCAwYbbjJ6Kk bvpXc17r1pq9tSABqLEQYIJZCkZSN8OJW6N+oQgpyDuV+7Cb+a2TB9vzLTD7ck3YEztN Zcmi5+PadGcu3C9fQFpKKuohSEC5JS+vczDvoW8Uaf/+nS4D+VivXlnWBl4x6a+Zpxgs oA9s3UJ3Sx87XyikqYNVF/fwZZLnwVN8IbyLJCTnWAsMsBHNRvBMHP5arODHTaCOwL2a byaUCZ2EiSp/ZvrUPgWkklnN2h2UkAe04II7scXe0MdM7wX20kwk94YkuaBxu+SpsD0f yNiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=ppyPwtt5n85t9ULlL3N3xlbKIm0Tw6nUJj2XNXuvqyM=; b=CdRaiIt1JZufTbk3XF0Nc2nut2zLLbkr0KvtxvDY1qFRr2b28bs6as4ug/6chn5c1B NHmMKV7cBZVVEFvi4AMedvAk9393hAdnKJlASgDZee0V5hixEnuBFeFYenzHotcfNijw ExrbD44CDL5HA0AugTTGcmyomigNvFcseuTpHYQTIu0Ln/UJxwg8pxhZ7o8aQBfsJCvy 5VQ/ABzdPUhhAQS2jmyZmWo6KZvkjay6+zPkr6znn1c0SqSMe6h4DIVhvYwLdPzTqBur BTqMQE3V0yhqKTJoL3lcRVTv0ks4txfyBBK3qsx+TzFQDm5zfF8QERXdAXM/0cSMGKAI bYgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=pE3noKnz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si9841351edi.220.2021.10.21.19.32.48; Thu, 21 Oct 2021 19:33:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=pE3noKnz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232351AbhJVCb3 (ORCPT + 99 others); Thu, 21 Oct 2021 22:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbhJVCb0 (ORCPT ); Thu, 21 Oct 2021 22:31:26 -0400 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57DC8C061224 for ; Thu, 21 Oct 2021 19:29:09 -0700 (PDT) Received: by mail-pf1-x44a.google.com with SMTP id t12-20020a056a00138c00b0044d255ba434so1444578pfg.17 for ; Thu, 21 Oct 2021 19:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ppyPwtt5n85t9ULlL3N3xlbKIm0Tw6nUJj2XNXuvqyM=; b=pE3noKnzPMT7teGJLrQJpn1gerl+AMcHg8Dbs1ag4fUvRBlJzJBG1sTYH11At0gW5o R7uU9pewISmYZsLVrahy3kEnTTNgqNSBFQ/QbU5jbtpIdMdKgjKkShAyYskfrpkKw/fr OTcN5LaTiIED26DSiYM9gIp6bM3rXpMdDePStxu6+IGqGTj7ze+uXuBxzbGwbyzxykED ER6WL42eFjN2Yo7Pin9BJFAkR7J+t3V7h54btZqtwiFVbArkuPXH1ZMDqqOMvvGLsOsg FSYzpGLw9b0/AUKDpizj8flGmTwlSQyS1nqYv45S+YZ10Pzn/9cDsxLp5EYzE/wsJaaF 1BNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ppyPwtt5n85t9ULlL3N3xlbKIm0Tw6nUJj2XNXuvqyM=; b=dMcEbvBK4nr9qP3swTe5k8jpqVpnmcAF1l9uy/pJ+NTV9xjhaPWYACHr6MPQICcSNW ZjS34Um/EfGnUm6F90zmeu6Pmi/6JGS1DUIdOpjS+Zo560zkkvFfa3f4OtJAx3Vv0NZm PYoR+Im4CJQ4PZ6iEQclE4BriATNGOKFDGnrjKuwMoZL2MBv7QR/t0txqpymuU3gjqlD 86qXj+vybgiH0zdX5e84qzz2VAAijxH0psDi0JC1Ap5PoWIM4lBEFWQG3nX/191j7+Nd u51KSxa4SJpNqwENJ5LDPtgi97VaS8rbgYw78y5rfIIHcdF+xByQwNcgUguTCcD/mufq 9UaA== X-Gm-Message-State: AOAM531FIFKhYowB/UbIZdQBG4sc1QeR8wf+iLJr6FaVNRBAzcI5uD/t ExicMen6r650VioJoOgkKOUniWBAd2XH X-Received: from rajat2.mtv.corp.google.com ([2620:15c:202:201:cc25:d9a3:4b5:37b9]) (user=rajatja job=sendgmr) by 2002:a17:902:db0e:b0:13e:f4d3:84c with SMTP id m14-20020a170902db0e00b0013ef4d3084cmr8682802plx.2.1634869748751; Thu, 21 Oct 2021 19:29:08 -0700 (PDT) Date: Thu, 21 Oct 2021 19:28:58 -0700 In-Reply-To: <20211022022859.1888836-1-rajatja@google.com> Message-Id: <20211022022859.1888836-3-rajatja@google.com> Mime-Version: 1.0 References: <20211022022859.1888836-1-rajatja@google.com> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog Subject: [PATCH 2/3] i2c: enable async suspend/resume for i2c adapters From: Rajat Jain To: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dtor@google.com Cc: Rajat Jain , rajatxjain@gmail.com, dbasehore@chromium.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable async suspend/resume of i2c adapters. It enormously helps with reducing the resume time of systems (as much as 20%-40%) where I2C devices can take significant time (100s of ms) to resume. Signed-off-by: Rajat Jain --- 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 54964fbe3f03..8d4f2be54e17 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1576,6 +1576,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap) if (res) goto out_reg; + device_enable_async_suspend(&adap->dev); pm_runtime_no_callbacks(&adap->dev); pm_suspend_ignore_children(&adap->dev, true); pm_runtime_enable(&adap->dev); -- 2.33.0.1079.g6e70778dc9-goog