From patchwork Fri Jul 28 10:47:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 9868427 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 BA4E26035E for ; Fri, 28 Jul 2017 10:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B82F6288A0 for ; Fri, 28 Jul 2017 10:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD2C7288B7; Fri, 28 Jul 2017 10:47:31 +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 577FE288A0 for ; Fri, 28 Jul 2017 10:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751690AbdG1Kra (ORCPT ); Fri, 28 Jul 2017 06:47:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46558 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbdG1Kra (ORCPT ); Fri, 28 Jul 2017 06:47:30 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C651660A17; Fri, 28 Jul 2017 10:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501238849; bh=9D1hs+jTcL3tWLzpaoP4k1Qm9Fm33eJf4Zo8M/ZI5qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dqAQYXAzZTHPkkoz4ZrSKlhDpp539Jw/NYQY6KKIXB8RM0Wj1Uw0dkSVLsCiBiVZg /ByGWqtfl3NVhDDPPa2z/q4QYuFfzGBn1FXq19cRCwGhNEmy+RHSeZVNlkxwGD7+Nw 8XhrUDXzq7WSn6za5OPpOguWqRVMAfLQ+aGIBL/Y= 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 21CB86095E; Fri, 28 Jul 2017 10:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501238848; bh=9D1hs+jTcL3tWLzpaoP4k1Qm9Fm33eJf4Zo8M/ZI5qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1je1B/Jul29WDeL5YdPNxiOYkHTksjXQ222xjmO83eNl5LP+AlrNQn/QDuzbMKv5 AHEMkqD0yk/jaGQx/Ur23cqu+VZL7ZLA4VLgecgxYfNTYBxkiyfEqNOPoTtlVXFV3F EAaJsxEnXEiLmnmFZCOmGrzhgmhvhm10vJrxpfsM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 21CB86095E 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, Archit Taneja Subject: [PATCH 02/10] drm/msm/mdp5: Drop clock names with "_clk" suffix Date: Fri, 28 Jul 2017 16:17:00 +0530 Message-Id: <20170728104708.20635-3-architt@codeaurora.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170728104708.20635-1-architt@codeaurora.org> References: <20170728104708.20635-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 have upstream bindings (msm8916) that have the "_clk" suffix in the clock names. The downstream bindings also require it. We want to drop the "_clk" suffix and at the same time support existing bindings. Update the MDP5 code with the the msm_clk_get() helper to support both old and new clock names. Signed-off-by: Archit Taneja --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c index 5694344db762..efde2d69ec09 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c @@ -511,7 +511,7 @@ static int get_clk(struct platform_device *pdev, struct clk **clkp, const char *name, bool mandatory) { struct device *dev = &pdev->dev; - struct clk *clk = devm_clk_get(dev, name); + struct clk *clk = msm_clk_get(pdev, name); if (IS_ERR(clk) && mandatory) { dev_err(dev, "failed to get %s (%ld)\n", name, PTR_ERR(clk)); return PTR_ERR(clk); @@ -896,22 +896,22 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev) } /* mandatory clocks: */ - ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus_clk", true); + ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus", true); if (ret) goto fail; - ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface_clk", true); + ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface", true); if (ret) goto fail; - ret = get_clk(pdev, &mdp5_kms->core_clk, "core_clk", true); + ret = get_clk(pdev, &mdp5_kms->core_clk, "core", true); if (ret) goto fail; - ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync_clk", true); + ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync", true); if (ret) goto fail; /* optional clocks: */ - get_clk(pdev, &mdp5_kms->lut_clk, "lut_clk", false); - get_clk(pdev, &mdp5_kms->iommu_clk, "iommu_clk", false); + get_clk(pdev, &mdp5_kms->lut_clk, "lut", false); + get_clk(pdev, &mdp5_kms->iommu_clk, "iommu", false); /* we need to set a default rate before enabling. Set a safe * rate first, then figure out hw revision, and then set a