From patchwork Wed Jul 31 20:29:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 170230 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp4462591ile; Wed, 31 Jul 2019 13:29:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzBDW3di7xccuE+3qFLUPXv4bqceZMnpWqa3Hwb2tu0YqUIIzQaja2Dc/0RUeb4JkxVPU2 X-Received: by 2002:a17:90a:d80b:: with SMTP id a11mr4427452pjv.53.1564604992572; Wed, 31 Jul 2019 13:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564604992; cv=none; d=google.com; s=arc-20160816; b=TLu1uLvSBHjuvOxqb3YhyJ8uCZQL+ZqIdhWqTncZY4fteSAY9lITBDtb1GUOzoEKHV s1IwLRBhFRL09QjSkgqn48BEsDo63a9+tdhJZyQdqLk+YdXD0VKdkmNc8zsBMa/U4vvS KnRUTPBxmT4s+tSO7zv+p9RA5g3JMO55T7ujue/GBw99XGl+rI+Mvsp79EP8Dmd5yFB4 c2qdDDtlYjchOE7PI4fj7r/pVRgpKd43j15arM404pNyMXblhBLT8AYGUOfwmQk3D1ne NvO6HZafEN6QRA/nY6ZqCbjcHJEAg/34u4lYc/B8cAzDGv7PHhmV+Qfqz4EwIOHBOJFO 53fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=onetUiZPcKYw43ltVy2pax5WwMNPrRMe/eAwSVGynt4=; b=T/UaEQS6JWjEQEfNwBfcUh/A7RyjBFbiwhdkO/DQCVQurEY8YMx9aFe253Sv2xoRAU fshHBSeapGYXfoSO6faWqcYynMWQTGJmd6mMeukitMrDBdq2Mqm1lbdeXILqhDcSTmkC rQAObVsV1VV7m59jPnVe/QcZIBE0FTrHEBxMrbsqDPVbIglfVyAmN0AF3pPasWSC+bqh q+k5EXiqq3ieaGmh/Iw8zNCL38JgN3qUgZvCodw+5tNzd8fcrG2N1wG7GhDjqkrlgrxk T89/EHPg7z3KOvJ15OJRTnQYCvlw3HZd/CW4Rot2ldEaC66o45/40wN6Hskjm1S+vmDs C49g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hyDo5hAh; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si31916126pld.293.2019.07.31.13.29.52; Wed, 31 Jul 2019 13:29:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hyDo5hAh; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730729AbfGaU3t (ORCPT + 16 others); Wed, 31 Jul 2019 16:29:49 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45132 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730706AbfGaU3t (ORCPT ); Wed, 31 Jul 2019 16:29:49 -0400 Received: by mail-wr1-f65.google.com with SMTP id f9so71056177wre.12 for ; Wed, 31 Jul 2019 13:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=onetUiZPcKYw43ltVy2pax5WwMNPrRMe/eAwSVGynt4=; b=hyDo5hAhRc4QzuIX2tUpIKbH3IelBuPVusXpwSvSNMh9tzz94z/m8CQjhd4r5uATJ5 IwiBzZESkY4K2MTQFADxZhMygATszMtZhDOOdYS00mhRA+Ghk8oOiibymHRGzOU+Rq5B 0kSFzaZLM6YrI5Dg311b3EyUCJyOYsL8cp3ImiXtGIQ86tI+ob9HD3LLh8VJqvSWbF1q djifVGZBkToBzRoVMRMciAwyXobYowv0eANNZz6d1ZX7+rOu96bPEEgOcSbZQbWbvbU7 0LI+p7KwSWs2S6a7C2EvLNXer9Mdq7XrKPpzat4dc6i5iig7t30hKa+U+utmJxSzVKpY 0D0A== 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=onetUiZPcKYw43ltVy2pax5WwMNPrRMe/eAwSVGynt4=; b=LMUWJ8TRM3CM74Likrx4XTJv7OVGf9w5n6bL2ShycTh5KBRNPc+HvTwLTIQZxrKbwL QD9PhkSLV8AIKUl/qLm2t+gXvpKk0usSrVIWzKJovAAJd2qHM9pDtmcecnTg04EfsE1y uwq0OWEBUGpT9uwX2Z2s8sAVGpv5qP/DkdPJrFfEH+dLsb6h1dZZviE9DyzMABuAAPNO RRIcKruhkfP/2iuyehoZ2GFECaCo76R6hkvs7A3Y5kflqjHlibHUvP8HQLnWumQjaRg+ ivx9xsGpWEkqRHUSiQnbiITi3tTmOVGBtulrzdUmTy8vM3cZ0gaEcgyUTR7fhyjts1u8 j7Cg== X-Gm-Message-State: APjAAAU5nZ+puTXSSGQykmtQprjHKF6gfbDM4s4WqHZ/iyJ8IkIiA4ne brf5XemQ3Evh8LUv2UoDGD78bA== X-Received: by 2002:adf:f046:: with SMTP id t6mr19884717wro.307.1564604987154; Wed, 31 Jul 2019 13:29:47 -0700 (PDT) Received: from localhost.localdomain (19.red-176-86-136.dynamicip.rima-tde.net. [176.86.136.19]) by smtp.gmail.com with ESMTPSA id i18sm91905591wrp.91.2019.07.31.13.29.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jul 2019 13:29:46 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, bjorn.andersson@linaro.org, sboyd@kernel.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v4 07/13] clk: qcom: hfpll: register as clock provider Date: Wed, 31 Jul 2019 22:29:23 +0200 Message-Id: <20190731202929.16443-8-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190731202929.16443-1-jorge.ramirez-ortiz@linaro.org> References: <20190731202929.16443-1-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Make the output of the high frequency pll a clock provider. On the QCS404 this PLL controls cpu frequency scaling. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Acked-by: Stephen Boyd --- drivers/clk/qcom/hfpll.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.22.0 diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index 87b7f46d27e0..0ffed0d41c50 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -53,6 +53,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) struct regmap *regmap; struct clk_hfpll *h; struct clk *pclk; + int ret; struct clk_init_data init = { .parent_names = (const char *[]){ "xo" }, .num_parents = 1, @@ -87,7 +88,14 @@ static int qcom_hfpll_probe(struct platform_device *pdev) h->clkr.hw.init = &init; spin_lock_init(&h->lock); - return devm_clk_register_regmap(&pdev->dev, &h->clkr); + ret = devm_clk_register_regmap(dev, &h->clkr); + if (ret) { + dev_err(dev, "failed to register regmap clock: %d\n", ret); + return ret; + } + + return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + &h->clkr.hw); } static struct platform_driver qcom_hfpll_driver = {