From patchwork Tue Jun 14 15:07:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 635356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rTY191ssgz9t1S for ; Wed, 15 Jun 2016 01:07:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=c0+EfHfV; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751119AbcFNPH4 (ORCPT ); Tue, 14 Jun 2016 11:07:56 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:34147 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbcFNPHz (ORCPT ); Tue, 14 Jun 2016 11:07:55 -0400 Received: by mail-lf0-f46.google.com with SMTP id j7so82552724lfg.1 for ; Tue, 14 Jun 2016 08:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jPpvp599cFhAxCykoppn/aGIHz8Vz9gPWpqA8qg/os4=; b=c0+EfHfVE5xYopKQggYI/1e0uJJgWhqh10Y9z/CZV04aMnd3tHhHpf2ZXm775DhKZs ix4yVF3CvBSAnpObidf9/N4+tIikW5nYNQ/8tD6c+UBFSfzDQqapG4bK+yn2EGqNWgy/ d3mzJGaaMpkr5A33H+eK3TdyGIExQPlCqJQRs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jPpvp599cFhAxCykoppn/aGIHz8Vz9gPWpqA8qg/os4=; b=R01A+funJKglKraZYFNICgiRpVXle4QAzrIdl1/4tt8V9E62N9RAxXqCL7c/FqsPtc oN/jrjwnLCsHtGItoQ5u2PAjBeAodfOh8GeocK7ORfC9uuT7yc9Vy+Odhmqa9K8jFH5h eSnlyVaU10q691ZSc4C3zNoev1ZuNHqoZ6RYZoWFwZqYiviGxy0qdKt9d1AdANfIxW9w SZ57/QdztRmnrSrpZWrHFFAu5jgqC5659/x+PPdz4uUxt4ccpr5qoTkcIZ0C6oDaDKSk 673bDL4O+1dvLmojNW0ZfcFXvtEoYlLopGn6owEB9Y5pVuOI8oDh2CDAo9cJtI4Xvyx0 GbQA== X-Gm-Message-State: ALyK8tJEGFKQwlhqNbIUGHigfptIyCZqJwQSLShajnczRed5z5OHMi20JgbfaUz5h2nYLQ/e X-Received: by 10.25.170.134 with SMTP id t128mr2111076lfe.133.1465916873773; Tue, 14 Jun 2016 08:07:53 -0700 (PDT) Received: from localhost.localdomain (h-155-4-128-67.na.cust.bahnhof.se. [155.4.128.67]) by smtp.gmail.com with ESMTPSA id f195sm3477060lfb.47.2016.06.14.08.07.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 08:07:52 -0700 (PDT) From: Ulf Hansson To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , John Stultz , Guodong Xu , linux-arm-kernel@lists.infradead.org, Ulf Hansson Subject: [PATCH 06/10] i2c: designware-platdrv: Update runtime PM last busy mark in ->probe() Date: Tue, 14 Jun 2016 17:07:24 +0200 Message-Id: <1465916848-8207-7-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465916848-8207-1-git-send-email-ulf.hansson@linaro.org> References: <1465916848-8207-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org To avoid the device to be immediately runtime suspended when ->probe() returns, update the last busy mark to use the delay from autosuspend. Signed-off-by: Ulf Hansson --- drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 4083376..106856f 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -253,6 +253,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) if (dev->pm_runtime_disabled) pm_runtime_put_noidle(&pdev->dev); } + pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put(&pdev->dev); return r;