Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2895864ybc; Mon, 25 Nov 2019 06:01:26 -0800 (PST) X-Google-Smtp-Source: APXvYqylPCh8dvPCAFYehpvqUAO2mFPi7CIwatUlXlE2g778BHgvjtIbgCVl2In5HHS0kRu2U+sO X-Received: by 2002:ac2:52a3:: with SMTP id r3mr17488167lfm.189.1574690485879; Mon, 25 Nov 2019 06:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574690485; cv=none; d=google.com; s=arc-20160816; b=TMcaSuq0CH7SZSxLKw8Y9Z80YnIYArhBVzrxC5+pgbLG8NKraQxvZJexGQeimxX/3t YvEhak/CgbjilfmK8GqLUlXGQz9Tz6usyX/Rv2MUFtl1Mx7JgU1BCJanUKwuyD/AaRJw UwD+aZY841ahlnxRC9j56439zU1mTH7ciq2Ft0SyZsoJShU/XlsZiCS984Rphwx+kYlj IydRa5EVvf1uJnqsrR1G1eVciG9fxftuOFSwLxhOIrZASV7LJk3soDjrH4zn63kmUtY1 8bfSdDgpLnD6T2z43I9BfibNawNz4FNZBDXiwGN5SqdtUoKUfvM3BLrMMRIWv32V5/ty Annw== 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=mFx2G6rwu7kpdvcXD41l6BM92KOVYIpnpySewMnY058=; b=ZpwrebyhvryowvYzQyNEnP3l/DSBo6fhpXrqfk5Pvh4f864fXzgHbYdoHB5i/1S/Sz NL5kqn+4+FNol5ophUGe1l3Ok/nZoMhufgvdP0f+jPC0FQPv6at5ZmyBQIooYk5zqhB8 3Iec8HOfaProxaa7WQRim4UmkeKg7hJuXup6mXExf0dRuMUFeouRH9jfrMP8oj3bcbjM zF0LdsXYNdXsaGUGQQgOkRABnnQBl8KoEUafiDm9oP8W4PEgzX/Iy2QhjI3/t5VjFJdM QGFW9E6Y5aIfezb7h1MMLyWUK9pQQvFpGeQ3ZvGptS0tVludE/IBju+Z969qFXIjF2eH lfaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zmgWdTfe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 v11si4621087eju.135.2019.11.25.06.00.53; Mon, 25 Nov 2019 06:01:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=zmgWdTfe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727912AbfKYN7e (ORCPT + 99 others); Mon, 25 Nov 2019 08:59:34 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46085 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727722AbfKYN7e (ORCPT ); Mon, 25 Nov 2019 08:59:34 -0500 Received: by mail-lj1-f196.google.com with SMTP id e9so15944815ljp.13 for ; Mon, 25 Nov 2019 05:59:32 -0800 (PST) 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=mFx2G6rwu7kpdvcXD41l6BM92KOVYIpnpySewMnY058=; b=zmgWdTfearD+sHjWeRlK/bx0dgy/bakLlEYxv8GGf+siHKTg8Pd29fjMZvoTWR5uS7 Pv7/bI+YTelbau7+aLwKBalnifKR5722jLwOg9/+0nRfFVE4bv7QWmUyupBm123opiZw LzPE7f/aWEugYp1FYSUNUyfZCVWJXnrAwcsjeR3p5f3LWlTfuY3uLWhx4HjaCtjW1INw 3bAMgT0va6MHiOYgdrTP5MQQT0R/aODxvK/vi3aFRW+tojJkrsJPMlMf+gy/UmteOfbF W2/HXRW/Nnod0De3hIAseGbAiGbExUflxWVqtbM9uXV1rjs/qC/1TtDPoiOabAAmvqTQ lzxw== 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=mFx2G6rwu7kpdvcXD41l6BM92KOVYIpnpySewMnY058=; b=k6C9maWKNFR1VJTWijCuPzknxTJM7Y5lAWXvWI/ECeCXN8yRfBKN4QRjUINv/QD8ks dOjE+HFPXxvfo6dfhlJhOsPE+PD3rkdqIXbc6/ejR76OxqGAmIROxtSmtDRIeVEKf7ah vvv5fOxSXlAXj/2M5+I83kTreUDgeNlfc1SNLSuWqPek1myIgdvmO+YhnliUBlCfhCOf qQa8SkU+HU5kYIOaukQmnlI6rGHiIgW/tzarbLaSc8qMvjlfv8Bmx6J4ulQxHpqwUEx4 VYlmZOMTwBurrG2tnjEI0YTB3NOODpkQza4uibWaEQIQ0+WJar1Hnc+bhqPsTA0Y4u5A o5EQ== X-Gm-Message-State: APjAAAVqSc5jQ4S7CZYW+FETyWNFhvfGJbIu/WEOrmHO6FUlRwlhXVnE jnddOEW4PPhOMvM8eoeXeM7lNQ== X-Received: by 2002:a2e:7016:: with SMTP id l22mr22669006ljc.227.1574690371750; Mon, 25 Nov 2019 05:59:31 -0800 (PST) Received: from centauri.lan (ua-84-217-220-205.bbcust.telenor.se. [84.217.220.205]) by smtp.gmail.com with ESMTPSA id s23sm4041871ljm.20.2019.11.25.05.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 05:59:31 -0800 (PST) From: Niklas Cassel To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, amit.kucheria@linaro.org, sboyd@kernel.org, Jorge Ramirez-Ortiz , Niklas Cassel , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/7] clk: qcom: hfpll: register as clock provider Date: Mon, 25 Nov 2019 14:59:05 +0100 Message-Id: <20191125135910.679310-4-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191125135910.679310-1-niklas.cassel@linaro.org> References: <20191125135910.679310-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jorge Ramirez-Ortiz 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 --- Changes since v2: -None drivers/clk/qcom/hfpll.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index a6de7101430c..e64c0fd82fe4 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -57,6 +57,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) .num_parents = 1, .ops = &clk_ops_hfpll, }; + int ret; h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); if (!h) @@ -79,7 +80,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 = { -- 2.23.0