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: 70037 Delivered-To: patches@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2098712qgf; Tue, 14 Jun 2016 08:08:06 -0700 (PDT) X-Received: by 10.25.4.4 with SMTP id 4mr1707284lfe.208.1465916874171; Tue, 14 Jun 2016 08:07:54 -0700 (PDT) Return-Path: Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com. [2a00:1450:4010:c07::230]) by mx.google.com with ESMTPS id x124si14626754lfd.231.2016.06.14.08.07.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jun 2016 08:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::230 as permitted sender) client-ip=2a00:1450:4010:c07::230; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::230 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x230.google.com with SMTP id j7so82552713lfg.1 for ; Tue, 14 Jun 2016 08:07:53 -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=LeiRIkotx8aDG9kufTDAj17xoLeOgIct3pDSeZJ+71HiBcHkItbP+VtxhFhqjppSDN zivUEfnCKRB0NwlqIJdBMkU1UM/dxOGfA2gc5p+A5FK3VIg9DB56g/sm9+qS9OfUL1Dr Cb9tpy0WhLaAII+I+2dAiRzw2ZLCE9x8kzKR+A/rmUVmu11UhU/lWgBEE7d8c2E+FRU5 uSPLt02dTmElGuLwiTfrDRNyB264VAkQRlZfcvB5i/Qksp7g4F3+BAlTl9kzXkG5ZqT/ bXeZVB2H9L2XHDCLtNQCy7S6DKtzrl+u8C4XGjMjLDhv1w/fM4c/G+FtlnGXJ3SFwUWv teHA== X-Gm-Message-State: ALyK8tKnu0sDlB0bcCwNjbEWkLN2HAOjlKX+aOzBRuuNI7UPdb/2sqY2VEW6gPyiPCIapLR2ick= X-Received: by 10.25.170.134 with SMTP id t128mr2111076lfe.133.1465916873773; Tue, 14 Jun 2016 08:07:53 -0700 (PDT) Return-Path: 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> 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(+) -- 1.9.1 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;