From patchwork Thu Oct 29 09:37:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7517801 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 980669F327 for ; Thu, 29 Oct 2015 09:37:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1E10209D8 for ; Thu, 29 Oct 2015 09:37:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90B45209D4 for ; Thu, 29 Oct 2015 09:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756838AbbJ2Jh3 (ORCPT ); Thu, 29 Oct 2015 05:37:29 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:57892 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756747AbbJ2Jh0 (ORCPT ); Thu, 29 Oct 2015 05:37:26 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 29 Oct 2015 18:37:24 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 03C994EFD7; Thu, 29 Oct 2015 18:37:24 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id E4F9F1800A; Thu, 29 Oct 2015 18:37:23 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id D941218071; Thu, 29 Oct 2015 18:37:23 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id UAN14759; Thu, 29 Oct 2015 18:37:23 +0900 X-IronPort-AV: E=Sophos;i="5.20,213,1444662000"; d="scan'";a="197466997" Received: from mail-pu1apc01lp0015.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.15]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 29 Oct 2015 18:37:22 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by SG2PR06MB1019.apcprd06.prod.outlook.com (10.161.9.27) with Microsoft SMTP Server (TLS) id 15.1.312.18; Thu, 29 Oct 2015 09:37:20 +0000 Message-ID: <87oafiyq8y.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] i2c: rcar: call rcar_i2c_init() after pm_runtime_get_sync() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Simon , , Wolfram Sang CC: Magnus , MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 29 Oct 2015 09:37:20 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0022.apcprd06.prod.outlook.com (25.164.91.32) To SG2PR06MB1019.apcprd06.prod.outlook.com (25.161.9.27) X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1019; 2:BtiXj7G4YFjHU0Eoh+SJfQtoDA2aM1k33cphxjE2HJGCaXwvq+aRWs+gp+ZpS+lowj2rsFYUDOIUxTIGVOHN2cm2ZrmL7tC03o8nXt0XMVIS0k4efcsb0V1xjVqJo/iMbyc0xBL27g3NhtaAHfQkMxcWge+e8GsniTFEUMXY1so=; 3:CjlnbGyHOWgrH5IXnOXj5ku2VK8nIdu0xJDXTJVFXerSWjLhbSSoOc4kG/eAmBezc/usMZ81zdaHF0AkxzlYtm16V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bhxrVrbDpYJe+LgUFyDfaE0PiX/r5Ivk4FfH3nEc1304rrM2LbMFBVC5YWBlMRxRB9mRvbD8DkTrHalnGC/V6rLVMdH55bIyG3AHVDHj0rDm4c7+quBPnDrPZFlQzHcYKcu/0k2iZ6mhl4Cnr+P+9WJjPwyjnjzJUn9VdO4hT4O+ckr18s+pIxhshuv/g+YV1LX9D9/y1RSjwwIjIbO060/xe4dgS1KdJMqMJ1TRCoEHAO7JYUsgp2jdtS5ZHEcptglXAZbFbxSrMrynphOYBXXfLN8Tg97S9gW5Iwpjcq+1Qb1L2etw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046)(102215026); SRVR:SG2PR06MB1019; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1019; X-Forefront-PRVS: 0744CFB5E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(50466002)(5001770100001)(5008740100001)(4001350100001)(53416004)(189998001)(97736004)(81156007)(92566002)(23726002)(87976001)(5001960100002)(19580405001)(229853001)(69596002)(77096005)(19580395003)(47776003)(5007970100001)(5004730100002)(40100003)(101416001)(106356001)(105586002)(86362001)(122386002)(42186005)(50986999)(33646002)(83506001)(66066001)(36756003)(46406003)(54356999); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1019; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1019; 23:G/WFjH1IciNkMIniCs+tfCJOf888sGUifvNiV5jgw?= =?us-ascii?Q?gf3509BMzh1yeK3QMrJjGMhkPaflc8Z7tLwUaCoaDOBx0ABOkieJRq3IUTQv?= =?us-ascii?Q?xux0Y0W6yoioRRCPGdubHax0tSnUD5UG1BsvPg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shn2R4n0dyWikpuAzLQt1QgF/pvw8ZFw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1019; 5:eoo17IzNzjGXxUnFcrexe3kZThboVd/thby7vPX+X++2r59xkO6yvJM2Ri7Hzbo5NcWnRTlWBgiuFMCLtsHIiQShghniluqzwgt9rpIQPF/ziFMs29k3EY2N6PvGhiaAN5aakpzRg9riEHvoHE2rhg==; 24:PS0LJ1zP92JNkQAv14ks9U/4D10+qHCQz/Hg+qVygeHUNkjBRhkOaGVrU1jCu64mdT9/ybD7T0QZfb1mqpimJ8H/2GqbY4lCcgdxIMsiAFk=; 20:z7i41iyffdPWlZ6fBwWoTGFIkCttknfvbYsqEfmt5oYrUvCaPsIqALiPC9XmYjmoKxlz+gy/7XnRIypQVY/S3Yk7H8gdPl4ikbVc0Pv7/7LcMeEJSKS8ebPsdb6uwZrjUPgzKsEWbUwBxZoXrR1eDnB+O3Yp6IA3QGOQKjtvopg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2015 09:37:20.0143 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1019 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto rcar_i2c_init() initializes I2C device, but it should be called *after* pm_runtime_get_sync(). Otherwise it outputs very hi speed clock. This patch solved this issue, This patch also removes pointless rcar_i2c_init() from rcar_i2c_probe() Signed-off-by: Kuninori Morimoto --- drivers/i2c/busses/i2c-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 616433d..edbfefc 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -474,6 +474,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, pm_runtime_get_sync(dev); + rcar_i2c_init(priv); + ret = rcar_i2c_bus_barrier(priv); if (ret < 0) goto out; @@ -612,8 +614,6 @@ static int rcar_i2c_probe(struct platform_device *pdev) if (IS_ERR(priv->io)) return PTR_ERR(priv->io); - rcar_i2c_init(priv); - irq = platform_get_irq(pdev, 0); init_waitqueue_head(&priv->wait);