From patchwork Thu Nov 10 05:04:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 5021 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2EEF323E51 for ; Thu, 10 Nov 2011 05:04:40 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id C2235A181FD for ; Thu, 10 Nov 2011 05:04:39 +0000 (UTC) Received: by faan26 with SMTP id n26so3481805faa.11 for ; Wed, 09 Nov 2011 21:04:39 -0800 (PST) Received: by 10.152.102.148 with SMTP id fo20mr3481938lab.51.1320901479588; Wed, 09 Nov 2011 21:04:39 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.196 with SMTP id e4cs8711lae; Wed, 9 Nov 2011 21:04:39 -0800 (PST) Received: by 10.52.91.5 with SMTP id ca5mr10393714vdb.9.1320901477376; Wed, 09 Nov 2011 21:04:37 -0800 (PST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com. [216.32.181.184]) by mx.google.com with ESMTPS id b6si5979090vdw.114.2011.11.09.21.04.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 21:04:37 -0800 (PST) Received-SPF: neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.181.184; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail56-ch1-R.bigfish.com (10.43.68.250) by CH1EHSOBE008.bigfish.com (10.43.70.58) with Microsoft SMTP Server id 14.1.225.22; Thu, 10 Nov 2011 05:04:12 +0000 Received: from mail56-ch1 (localhost.localdomain [127.0.0.1]) by mail56-ch1-R.bigfish.com (Postfix) with ESMTP id 45FB2AC810B; Thu, 10 Nov 2011 05:04:24 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h63h) X-Spam-TCS-SCL: 2:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail56-ch1 (localhost.localdomain [127.0.0.1]) by mail56-ch1 (MessageSwitch) id 1320901463782443_22097; Thu, 10 Nov 2011 05:04:23 +0000 (UTC) Received: from CH1EHSMHS030.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.251]) by mail56-ch1.bigfish.com (Postfix) with ESMTP id 9AB8E160004F; Thu, 10 Nov 2011 05:04:23 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS030.bigfish.com (10.43.70.30) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 10 Nov 2011 05:04:34 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.339.2; Wed, 9 Nov 2011 23:04:33 -0600 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pAA54UMd020709; Wed, 9 Nov 2011 23:04:30 -0600 (CST) From: Richard Zhao To: CC: , , , , Richard Zhao Subject: [PATCH 1/1] i2c: imx: convert clk_prepare/clk_unprepare Date: Thu, 10 Nov 2011 13:04:19 +0800 Message-ID: <1320901459-13208-1-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com Signed-off-by: Richard Zhao --- drivers/i2c/busses/i2c-imx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 58832e5..aad623b 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -196,6 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx) dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__); + clk_prepare(i2c_imx->clk); clk_enable(i2c_imx->clk); writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR); /* Enable I2C controller */ @@ -246,6 +247,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) /* Disable I2C controller */ writeb(0, i2c_imx->base + IMX_I2C_I2CR); clk_disable(i2c_imx->clk); + clk_unprepare(i2c_imx->clk); } static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,