From patchwork Wed Nov 8 08:50:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 835710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yX0Pj2vcHz9ryQ for ; Wed, 8 Nov 2017 19:50:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750752AbdKHIur (ORCPT ); Wed, 8 Nov 2017 03:50:47 -0500 Received: from sauhun.de ([88.99.104.3]:59902 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdKHIur (ORCPT ); Wed, 8 Nov 2017 03:50:47 -0500 Received: from localhost (p54B3399F.dip0.t-ipconnect.de [84.179.57.159]) by pokefinder.org (Postfix) with ESMTPSA id 828612C3332; Wed, 8 Nov 2017 09:50:45 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Jacopo Mondi , Yoshihiro Shimoda , Wolfram Sang , Geert Uytterhoeven Subject: [RFT] i2c: sh_mobile: let RuntimePM do the clock handling Date: Wed, 8 Nov 2017 09:50:37 +0100 Message-Id: <20171108085037.1318-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org No need to do it manually. Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Tested-by: Jacopo Mondi --- jacopo: can you test this on Migo-R, please, on top of the other I2C patches? I tested it on a Lager and it worked there. Will try Gen3 later, too. drivers/i2c/busses/i2c-sh_mobile.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index ebd146ccb24465..80561ffbcf7b46 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -702,7 +702,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, /* Wake up device and enable clock */ pm_runtime_get_sync(pd->dev); - clk_prepare_enable(pd->clk); /* Process all messages */ for (i = 0; i < num; i++) { @@ -743,7 +742,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, iic_wr(pd, ICCR, 0); /* Disable clock and mark device as idle */ - clk_disable_unprepare(pd->clk); pm_runtime_put_sync(pd->dev); return err ?: num;