From patchwork Mon Oct 30 00:46:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou.Yang@microchip.com X-Patchwork-Id: 10031857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E7EA600C5 for ; Mon, 30 Oct 2017 00:51:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EC5C285A0 for ; Mon, 30 Oct 2017 00:51:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 133802873C; Mon, 30 Oct 2017 00:51:00 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C85D285A0 for ; Mon, 30 Oct 2017 00:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fwtors6fCpnupEOkdAJHHOIb/pohhjdKgT1lB1wPsRo=; b=LiSIg3KuzXg8Zg 701GHdbRS5Te9U+PN897ZHxYzqICsrH/jJTHRH14EO6wMoCwobuTjgsgLE53Cv6eSnaLbZIsYjM8w o5RFfvjhnCOyrnLI/lS/a497nhoewrIHDIjCo4tsPoVPUc2iqkX4VselgLa4tDJFjhSzMwWB0x6IB UOfZ79OjfekxzZweWh7l86sOcY3kdJH9v1lfc3bRxjwUSO/y7oHG5gXTkQYczkSIcehNI8JKCkchM UYvpzy8CsB4YXt3fXMk8MdiS54gLZbhgxQcNdGKR2u44poAMWjJ373ToXWp2Jb35uwuOCQy3jLRit DBz5zkCbEycEAWhdW3gw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8yI4-00057z-67; Mon, 30 Oct 2017 00:50:56 +0000 Received: from eusmtp01.atmel.com ([212.144.249.242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e8yHz-0004wC-QZ for linux-arm-kernel@lists.infradead.org; Mon, 30 Oct 2017 00:50:53 +0000 Received: from apsmtp01.atmel.com (10.168.254.31) by eusmtp01.atmel.com (10.145.145.30) with Microsoft SMTP Server id 14.3.235.1; Mon, 30 Oct 2017 01:50:17 +0100 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Mon, 30 Oct 2017 08:56:47 +0800 From: Wenyou Yang To: Mauro Carvalho Chehab Subject: [PATCH] media: atmel-isc: Fix clock ID for clk_prepare/unprepare Date: Mon, 30 Oct 2017 08:46:50 +0800 Message-ID: <20171030004650.15571-1-wenyou.yang@microchip.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171029_175052_046569_A0E90122 X-CRM114-Status: UNSURE ( 8.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wenyou Yang , Jonathan Corbet , linux-kernel@vger.kernel.org, Hans Verkuil , Sakari Ailus , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the clock ID to do the runtime pm should be ISC_ISPCK, instead of ISC_MCK in clk_prepare(), clk_unprepare() and isc_clk_is_enabled(). Signed-off-by: Wenyou Yang Acked-by: Sakari Ailus --- drivers/media/platform/atmel/atmel-isc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index 2c40a7886542..9294ff0c7b83 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -598,7 +598,7 @@ static int isc_clk_prepare(struct clk_hw *hw) { struct isc_clk *isc_clk = to_isc_clk(hw); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_get_sync(isc_clk->dev); return isc_wait_clk_stable(hw); @@ -610,7 +610,7 @@ static void isc_clk_unprepare(struct clk_hw *hw) isc_wait_clk_stable(hw); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_put_sync(isc_clk->dev); } @@ -657,12 +657,12 @@ static int isc_clk_is_enabled(struct clk_hw *hw) struct isc_clk *isc_clk = to_isc_clk(hw); u32 status; - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_get_sync(isc_clk->dev); regmap_read(isc_clk->regmap, ISC_CLKSR, &status); - if (isc_clk->id == ISC_MCK) + if (isc_clk->id == ISC_ISPCK) pm_runtime_put_sync(isc_clk->dev); return status & ISC_CLK(isc_clk->id) ? 1 : 0;