From patchwork Thu Sep 27 11:48:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10618425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1D3C14BD for ; Thu, 27 Sep 2018 18:27:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C34E2BAA1 for ; Thu, 27 Sep 2018 18:27:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D7252BAB8; Thu, 27 Sep 2018 18:27:51 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 345A92BAA1 for ; Thu, 27 Sep 2018 18:27:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE1B9891EF; Thu, 27 Sep 2018 18:27:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06BAF6E598 for ; Thu, 27 Sep 2018 11:49:43 +0000 (UTC) Received: by mail-pf1-x441.google.com with SMTP id j8-v6so1742381pff.6 for ; Thu, 27 Sep 2018 04:49:43 -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:mime-version:content-transfer-encoding; bh=evIzUViMtSitn37dGrQoWQvRjD//VkqNrRvm4lXczmM=; b=bIaVg09oVAJPF//ufe+KtiN+BvkrtjY5IGN+8iYqTyXIyXjfX4lLRCh/Kqll2lMROB 8ey8TTQAPR8vylL/mSK3/USAGpRmxYojWfEnL6ebIpfh/HA2q593iSB5CV5vUszubLDi Gcp0j30rlFcZKzqlf+EdtVuoTVDv8MRzuv87Bt8b9sKWMq4PMZe+q0SjFI1qAic6hyiZ qOE1ZwA+0nePNTSZ69dPl+cGo7avJD56RST158gPT5Q37hRmGQFUnD4RZnBMVoHEf+Y8 ir6zoom51aXjpgUvM2ncLlLS0Z3o94akyVcyAejcV0/jGzk9zz5+IMn8AyrLcPK8f/J0 qiSQ== X-Gm-Message-State: ABuFfogS+/yyKRVfLUb+5GdB1HiT/1TXmtu+nzk+nI+fDgze9MWvRBIw QAgVGdIoWc9IK0Lfixa51K1xaw== X-Google-Smtp-Source: ACcGV62ZFmQwjQws/+ouyXzbnrxyyZGVERygjSkmC5OOlNytyjL5JB3pypWcGjIxaP09zerRD1ysyA== X-Received: by 2002:a63:d646:: with SMTP id d6-v6mr667310pgj.450.1538048983513; Thu, 27 Sep 2018 04:49:43 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:42 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 04/12] drm/sun4i: sun6i_mipi_dsi: Enable missing DSI bus clock Date: Thu, 27 Sep 2018 17:18:42 +0530 Message-Id: <20180927114850.24565-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Sep 2018 18:27:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP DSI bus_clk is already available in sun6i_dsi but missed to get the clk and process for enable/disable. This patch add support for it. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 8e9c76febca2..156b371243c6 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1004,6 +1004,12 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } + dsi->bus_clk = devm_clk_get(dev, "bus"); + if (IS_ERR(dsi->bus_clk)) { + dev_err(dev, "Couldn't get the DSI bus clock\n"); + return PTR_ERR(dsi->bus_clk); + } + if (dsi->variant->has_mod_clk) { dsi->mod_clk = devm_clk_get(dev, "mod"); if (IS_ERR(dsi->mod_clk)) { @@ -1012,6 +1018,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) } } + clk_prepare_enable(dsi->bus_clk); /* * In order to operate properly, that clock seems to be always * set to 297MHz. @@ -1065,6 +1072,7 @@ static int sun6i_dsi_remove(struct platform_device *pdev) sun6i_dphy_remove(dsi); if (dsi->variant->has_mod_clk) clk_rate_exclusive_put(dsi->mod_clk); + clk_disable_unprepare(dsi->bus_clk); return 0; }