From patchwork Thu Mar 16 03:31:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9627075 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 3311560244 for ; Thu, 16 Mar 2017 03:32:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27FAB26E4F for ; Thu, 16 Mar 2017 03:32:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CFFA27FAE; Thu, 16 Mar 2017 03:32:21 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no 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 E2D3B26E4F for ; Thu, 16 Mar 2017 03:32:20 +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=K0B7ih+wspMligANPD4Z2UhcB5VnyjE8qPBLv/jQAeQ=; b=r2RUwa6OLujfO8g08JPSDlTimC oUsUQJayMVVRBFnsUEypdnEF9dH97hL9WjOzGboUycWSqF7AHzO1iEvzZoi4HV+yndeGzJei95/bh UB4xUasogR4SyNsuREAeshrtSHZVGio5XxJIFy4teveRHLLHFlvJ0XGXWmo+XleSpWASSuUuM6gUW mUd84nuqeiV8Dw928guiXqfZ7ssOMSJLfhahq9/3cYVqUvKOofFXsYdyQSHDbizFk0ZDasJIsuRRB 1eWNys3pPQZyGzOV140I0VmQ8+H47Uv/crl83Eq4lQqpFcZu18uPewTsIiJSkVwn89a+ea5pZYgkv FzyeqCaA==; 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 1coM9E-0006nK-CO; Thu, 16 Mar 2017 03:32:20 +0000 Received: from mail-pf0-f194.google.com ([209.85.192.194]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coM99-0006jJ-7p; Thu, 16 Mar 2017 03:32:17 +0000 Received: by mail-pf0-f194.google.com with SMTP id o126so4202791pfb.1; Wed, 15 Mar 2017 20:31:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A6LDNUuyE8TDi/bjpjworHkzCGOVBQurBhqSIgljwqw=; b=D89Vn07/fGm9F/S9CaAfcNEfErlzPMxb37bTOx2gwjTp9sJo6aq564PvRfgiSknm1l qeShTVwQOlx9W/ao2dt2JlzN82uNojfr27+jwN877fe6uMuK7vZh3tbM9Dn1BasK78vU 9v/zuqhRPejjSfMkSlS7r8B73uOHL/xhajl0SUWpYbQUBQzPYOXHzBpu0YFxbKbPTLzg AOh2n0VWVJesjpprOI1Y65hA43gjbPjtpR75N92SLEOuJ2dPLl2e9zqwUTWPU9o+ctwr l/cyHnQxzxfGma9A+707ZIyo9LcYIC/1Y0S0gDUnZPbll5DMqM0y4pE/0TBbm+guT5T1 TOBQ== X-Gm-Message-State: AFeK/H305YYZ5oelk5A+7SmyGlitEqLmrqbh8Fj6g/Lh3coWY5KJdd94ZsaQrYJy8HeOng== X-Received: by 10.99.66.197 with SMTP id p188mr7517982pga.107.1489635116949; Wed, 15 Mar 2017 20:31:56 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id 19sm6781023pfo.50.2017.03.15.20.31.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 20:31:56 -0700 (PDT) From: Chris Zhong To: linux-rockchip@lists.infradead.org Subject: [PATCH v2 1/4] drm/rockchip/dsi: check phy_cfg_clk only for RK3399 Date: Thu, 16 Mar 2017 11:31:44 +0800 Message-Id: <1489635107-21327-2-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1489635107-21327-1-git-send-email-zyw@rock-chips.com> References: <1489635107-21327-1-git-send-email-zyw@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170315_203215_306355_78F6FC73 X-CRM114-Status: GOOD ( 11.24 ) 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: Heiko Stuebner , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chris Zhong , linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 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 For RK3399, the phy_cfg_clk is a required clock, if phy_cfg_clk is disabled, MIPI phy can not work. Let's return a error if there is no phy_cfg_clk in dts property, when the pdata match RK3399. Signed-off-by: Chris Zhong --- Changes in v2: None drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f84f9ae..11c4166 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -1227,15 +1227,13 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master, clk_disable_unprepare(dsi->pclk); } - dsi->phy_cfg_clk = devm_clk_get(dev, "phy_cfg"); - if (IS_ERR(dsi->phy_cfg_clk)) { - ret = PTR_ERR(dsi->phy_cfg_clk); - if (ret != -ENOENT) { + if (pdata == &rk3399_mipi_dsi_drv_data) { + dsi->phy_cfg_clk = devm_clk_get(dev, "phy_cfg"); + if (IS_ERR(dsi->phy_cfg_clk)) { + ret = PTR_ERR(dsi->phy_cfg_clk); dev_err(dev, "Unable to get phy_cfg_clk: %d\n", ret); return ret; } - dsi->phy_cfg_clk = NULL; - dev_dbg(dev, "have not phy_cfg_clk\n"); } ret = clk_prepare_enable(dsi->pllref_clk);