From patchwork Tue Jun 14 15:07:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 70038 Delivered-To: patches@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2098766qgf; Tue, 14 Jun 2016 08:08:11 -0700 (PDT) X-Received: by 10.25.165.129 with SMTP id o123mr1613408lfe.166.1465916875730; Tue, 14 Jun 2016 08:07:55 -0700 (PDT) Return-Path: Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com. [2a00:1450:4010:c07::234]) by mx.google.com with ESMTPS id f202si14665328lfb.147.2016.06.14.08.07.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jun 2016 08:07:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) client-ip=2a00:1450:4010:c07::234; 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::234 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x234.google.com with SMTP id j7so82553234lfg.1 for ; Tue, 14 Jun 2016 08:07:55 -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=STd+8uY9B3Aw5oeclXH1Sh8v8+WiZY1pVNfixcVRNE0=; b=bz4g/lz48e3JEjDTce65LqLgTd417L0q2evWkv4sxb/CyIPFjMmEmJkx0u/ENPJfB0 /T+l04T6WFbZFuWd4s3W4aYpY566MlXC+JvRLpG6DUCffe208G7ZfzqB0vm+kI9y6Nqm rQYWU/JKhJ6tayPIsgjKEVNe855M9w/cHjoiE= 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=STd+8uY9B3Aw5oeclXH1Sh8v8+WiZY1pVNfixcVRNE0=; b=MuEBcZWSQW8tRBz8J9X804QjFxy5mtzlmatzlwUpGlpfk5BFPpU4edEsaI8TmRDyVI cWelLS3ReO07TuenDLaC5h2RvLcyFdm2754re1N+dHvAIkgJRnwz7Q05I16FxuieT61N N1kCKcGLwKCrbHB9nvdzCGW7M5ySvbTNvwDv9zyzNASxolhmqk7LP+HkSk9vSeGUW9uw BNYqQp/BLWurvNom7JK4aAHMpoIaHvQzphX57zMI4025bbW4FiM9LpnBF9kUiaXIfWQn PzrOqNa/at5ihQ+SUdsQurb0hWfeyVfIzz/cc+8hMlChUcjHblrUMPKe0w/BT4AnFasM xYSg== X-Gm-Message-State: ALyK8tLqNG0V2uUFY+1VO2yPYsiCaPAJnEmQ1Fe1FPfb36avk7/63uDVOhNz2ZQq8zX1ga4jCc4= X-Received: by 10.25.28.21 with SMTP id c21mr1658152lfc.68.1465916875408; Tue, 14 Jun 2016 08:07:55 -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.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 08:07:54 -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 07/10] i2c: designware-platdrv: Re-init the HW when resuming Date: Tue, 14 Jun 2016 17:07:25 +0200 Message-Id: <1465916848-8207-8-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> In cases when the designware specific flag "pm_runtime_disable" is set, the HW becomes disabled during system PM suspend. Let's make sure it becomes operational when resuming by re-initialize it again. Signed-off-by: Ulf Hansson --- drivers/i2c/busses/i2c-designware-platdrv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 106856f..95a9f4e 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -337,9 +337,7 @@ static int dw_i2c_plat_resume(struct device *dev) struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev); i2c_dw_plat_prepare_clk(i_dev, true); - - if (!i_dev->pm_runtime_disabled) - i2c_dw_init(i_dev); + i2c_dw_init(i_dev); return 0; }