From patchwork Wed Jan 17 09:34:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 10168819 X-Patchwork-Delegate: agross@codeaurora.org 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 C5EDD603ED for ; Wed, 17 Jan 2018 09:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B67D128464 for ; Wed, 17 Jan 2018 09:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A572F28473; Wed, 17 Jan 2018 09:35:05 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5336328464 for ; Wed, 17 Jan 2018 09:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750806AbeAQJfB (ORCPT ); Wed, 17 Jan 2018 04:35:01 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:43432 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752462AbeAQJe5 (ORCPT ); Wed, 17 Jan 2018 04:34:57 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0DE9C60265; Wed, 17 Jan 2018 09:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516181697; bh=sHxIPc4sysWs/FjU6WU58O1j/8BDfcSp16ThtDK7O70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NnLVG8jwd/UcvE6x/+MufQtUptj0OXYEwLNB1/c63RvaV00Z3eKW1xNe/wf1ZV13W 7JnUbgKpAO/qmNiZsISZzPRPqftJANJbV1hEN7EAw1E8l9YWvz+wwzkkRXo2Mz+8ZR c3kSxv+RIINqfnA5c4/5vajhrQbnWui4PfxTKrzU= Received: from localhost (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AA18960265; Wed, 17 Jan 2018 09:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516181696; bh=sHxIPc4sysWs/FjU6WU58O1j/8BDfcSp16ThtDK7O70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UZBG85ywO0k0uDgfrCiZMVFtK7DZvENFHz7cA7sTywLRg1AKF/XUIEyWAG3NPZRY/ JjeD4svFzp+Q2ug2MYcl+ZBk1FQBxt1grJFr9Y0wy6c7qZvUjKY185Z4ikSN2n8vtq 4vemQI1v9jm9C2zy4KKdMPj6rIFeJ1QFA5FP+LWA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AA18960265 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org From: Archit Taneja To: robdclark@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, latkinso@codeaurora.org, sibis@codeaurora.org, Archit Taneja Subject: [PATCH 1/7] drm/msm/dsi: Use msm_clk_get in dsi_get_config Date: Wed, 17 Jan 2018 15:04:42 +0530 Message-Id: <20180117093448.4102-2-architt@codeaurora.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180117093448.4102-1-architt@codeaurora.org> References: <20180117093448.4102-1-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We try to get the interface clock in dsi_get_config early during DSI's component bind. Try getting both the "iface" and "iface_clk" clock name variants so that we are compatible with both new and legacy DT. Signed-off-by: Archit Taneja --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 0f7324a686ca..7611fe014036 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -214,7 +214,7 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( goto exit; } - ahb_clk = clk_get(dev, "iface_clk"); + ahb_clk = msm_clk_get(msm_host->pdev, "iface"); if (IS_ERR(ahb_clk)) { pr_err("%s: cannot get interface clock\n", __func__); goto put_gdsc; @@ -225,7 +225,7 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( ret = regulator_enable(gdsc_reg); if (ret) { pr_err("%s: unable to enable gdsc\n", __func__); - goto put_clk; + goto put_gdsc; } ret = clk_prepare_enable(ahb_clk); @@ -249,8 +249,6 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( disable_gdsc: regulator_disable(gdsc_reg); pm_runtime_put_sync(dev); -put_clk: - clk_put(ahb_clk); put_gdsc: regulator_put(gdsc_reg); exit: