From patchwork Sat Dec 22 20:26:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10741467 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCD751850 for ; Sat, 22 Dec 2018 20:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CECFF28A4F for ; Sat, 22 Dec 2018 20:27:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C27A228A51; Sat, 22 Dec 2018 20:27:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7697428A53 for ; Sat, 22 Dec 2018 20:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404959AbeLVU0m (ORCPT ); Sat, 22 Dec 2018 15:26:42 -0500 Received: from sauhun.de ([88.99.104.3]:52692 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404941AbeLVU0l (ORCPT ); Sat, 22 Dec 2018 15:26:41 -0500 Received: from localhost (p54B67A8B.dip0.t-ipconnect.de [84.182.122.139]) by pokefinder.org (Postfix) with ESMTPSA id 8D1732E35FD; Sat, 22 Dec 2018 21:26:39 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, Hans de Goede , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Wolfram Sang , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 8/9] i2c: exynos5: don't open code to reject transfers when suspended Date: Sat, 22 Dec 2018 21:26:22 +0100 Message-Id: <20181222202623.4521-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181222202623.4521-1-wsa+renesas@sang-engineering.com> References: <20181222202623.4521-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is handled by the I2C core meanwhile. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-exynos5.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index c1ce2299a76e..81b9c3cf4e75 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -183,7 +183,6 @@ enum i2c_type_exynos { struct exynos5_i2c { struct i2c_adapter adap; - unsigned int suspended:1; struct i2c_msg *msg; struct completion msg_complete; @@ -715,11 +714,6 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap, struct exynos5_i2c *i2c = adap->algo_data; int i, ret; - if (i2c->suspended) { - dev_err(i2c->dev, "HS-I2C is not initialized.\n"); - return -EIO; - } - ret = clk_enable(i2c->clk); if (ret) return ret; @@ -847,10 +841,7 @@ static int exynos5_i2c_suspend_noirq(struct device *dev) { struct exynos5_i2c *i2c = dev_get_drvdata(dev); - i2c->suspended = 1; - clk_unprepare(i2c->clk); - return 0; } @@ -871,7 +862,6 @@ static int exynos5_i2c_resume_noirq(struct device *dev) exynos5_i2c_init(i2c); clk_disable(i2c->clk); - i2c->suspended = 0; return 0; }