From patchwork Fri Mar 2 17:57:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 10255383 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 583FF6037F for ; Fri, 2 Mar 2018 18:28:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B2EE27FAC for ; Fri, 2 Mar 2018 18:28:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3005127FC0; Fri, 2 Mar 2018 18:28:07 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 AE5FD27FAC for ; Fri, 2 Mar 2018 18:28:06 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=LDorsIzKAsoa7FJ3vAnSO65fhe5Yo1hfAoyYoGQeuys=; b=owu7UJQf+X+8osXwdkp7WN7bAB RAaR7DgotPubfuHK1D+uFn2Y41iMif0XfqaMWKr+aqsQ8ruh9+6/aQm0EuQoXeeZScMpFsQngRth0 iCtVnIiWkUc38kODo4GnVOHDEBoc5xxdQZ0vRO7Vtfj8zaDscL9ap7pkmavbcoByMByK3A3R9B/vq DHn94jFs03iqk6LSLVJReeTSuOgpjb5SSAkR6ozNt6XQkV+lgZN1zXRjZKBhrsAxrtozsQ9nK3ep4 XmFaBOcMLFS6pqvAdXsQck2K2bOGCUk2c7MxMCAUxIPXhiVNugoflJvk/ztRicmd7dagmOzGL5jYt Q6l7RX/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erpPV-0006Za-S9; Fri, 02 Mar 2018 18:28:01 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erp9x-0000ZR-3B; Fri, 02 Mar 2018 18:11:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PteEvXfSHfIMRClZDE7CRMB5V9FBXFvcvHHzKYBVaFQ=; b=VPEGSpFOLA5ksmL/W8SBSaU4j F6qg8qvGmbS00NLhwxgAd4i336mR/jRg5iyj7liC1qei0SAeIHcWDv7qfDxnK0rItworQz42IvWBA h0klmyK1uH7fLlCRyrqOAw6T41D6FJKj4Lpw0MaAUQTiXFJNuUz/kCzy1moqQYwhvkBQfX7udV4R+ rPqoENvFII8hjPd4+S6s0QlXEbgLKVpbE359AG8krbVcybX0xZ2EW43My+7TMy8YXglG5JHjlamXu X/Glu8MSHCjJnX+SStM4uvzmyYMNNW7M4B/TQQs4WYelKIb6NfNrslgLGgQ8AZKNQsHKYhRseLeQD MGBDO2fRw==; Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eroww-0000Vo-1E; Fri, 02 Mar 2018 17:58:31 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 3B9B727821B From: Enric Balletbo i Serra To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= Subject: [PATCH v9 3/5] drm/rockchip: inno_hdmi: reorder clk_disable_unprepare call in unbind Date: Fri, 2 Mar 2018 18:57:55 +0100 Message-Id: <20180302175757.28192-4-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180302175757.28192-1-enric.balletbo@collabora.com> References: <20180302175757.28192-1-enric.balletbo@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180302_175830_076145_23C50763 X-CRM114-Status: GOOD ( 10.95 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Jernej Skrabec , Archit Taneja , Neil Armstrong , David Airlie , Jeffy Chen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans Verkuil , Andrzej Hajda , Russell King , Laurent Pinchart , Enric Balletbo i Serra , linux-rockchip@lists.infradead.org, kernel@collabora.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeffy Chen In bind the clk_prepare_enable of the HDMI pclk is called before adding the i2c_adapter. So it should be the other way around in unbind, first remove the i2c_adapter and then call the clk_disable_unprepare. Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support") Signed-off-by: Jeffy Chen Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra --- Changes in v9: - Added new patch to reorder clk_disable_unprepare call in inno_hdmi unbind() drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index a5c661930250..88d0774c97bd 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -906,8 +906,8 @@ static void inno_hdmi_unbind(struct device *dev, struct device *master, hdmi->connector.funcs->destroy(&hdmi->connector); hdmi->encoder.funcs->destroy(&hdmi->encoder); - clk_disable_unprepare(hdmi->pclk); i2c_put_adapter(hdmi->ddc); + clk_disable_unprepare(hdmi->pclk); } static const struct component_ops inno_hdmi_ops = {