Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2899935ybc; Mon, 25 Nov 2019 06:04:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwl4yX+ofxD9zPutBY+rFWICckpRNXE+/SnPR2vk/HxyGEab4loRhV8KYcMIaCYVgmbHlO3 X-Received: by 2002:a05:600c:305:: with SMTP id q5mr23932234wmd.167.1574690655775; Mon, 25 Nov 2019 06:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574690655; cv=none; d=google.com; s=arc-20160816; b=xWYiAhZW5/odHm1YUek7WPyAgRcuym5DCde0+pq7/Rf+jMYwIvYjH3ElrswegLsDQ6 TySTV4SoN/rP3zJFA+XjAIuGHkPSTGbvpB2o+CBGBqtloBK5KvPAOjK2arW5pNVwxOiV 0IhexmE5THXjHSnAtSaQhqCZwWMLyfsTLBRetU0S/jNAvM15nYW3DmIjDlK9mSbng0ye HCJZx8lYJXG9gcAtLH8eG5vYq34dQ2fY3qMvvcZWoARwwBKXBG3MgT4FDqTHQd0d8zNf FcWe3Y29LJw6JcMdzPBkP5fGAq1OKVAphUMeYg8PRW/TbHMzK6juVKhn9vkDLOWJsuf/ fcYA== 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=4n0b7csmummMNxZyeaSszKbcnCZgkdyzjnJK7yDR57M=; b=F/x7KuKMpxJUK2x8ienLloaZVFwuELi4NvQ8OORcTHQj0HONq8n/Jyik3hADtRT/p5 PmeyPFUOsFSupuis3paQosDXNqyjLos3N6dMsVhis1M148qT5at6sOqofbJ28t3SGmS6 Grr3mOW4nbqXqRiuZ2qgjBK9uk9bsWEfhVzgPEU4wbWFVNL1ZRi7iBHo3xZgvVVbdfI1 Mj+poQ1Amb9BdlBEoKYf7hQXdz5z9bt7s+4X2ZnfG/mIYoMx8VetDcQ/IkFAmhNox/nZ Sv4GpT+/b3Yo2XcM5t8wOmpGwg5VdG8G7fKR9LPvmWS0owX7nip6aHT+7u+MRP4ILyBO jOQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k9ZRUQYD; 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 dn7si5171005edb.20.2019.11.25.06.03.46; Mon, 25 Nov 2019 06:04:15 -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=k9ZRUQYD; 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 S1727941AbfKYN7l (ORCPT + 99 others); Mon, 25 Nov 2019 08:59:41 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:40847 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727877AbfKYN7g (ORCPT ); Mon, 25 Nov 2019 08:59:36 -0500 Received: by mail-lf1-f66.google.com with SMTP id v24so11088221lfi.7 for ; Mon, 25 Nov 2019 05:59:35 -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=4n0b7csmummMNxZyeaSszKbcnCZgkdyzjnJK7yDR57M=; b=k9ZRUQYDRGLuJPThscWn5IqxsfcWQDaQNqRK8f+eV8GDXkdsHk7cLxpS1kIb7q/TK9 doPl76pMJCXckPDBFOzdRQr3C7Wi2JVgxyFnVsl7NOXHGiUQoa8fEXoybWLyMiJqjo8U s+pKy6+ty7tBmr8QqFWAzRuvPPvh9/EbUX8nXGO8HBjTHjiK6ciyITdid+9OZI7nLLQe 1jjYyrsMn/ufrJQ4b5A36nNfwz4R/PxnMoNRUGPOUYogvGMIUnC53s5VZFGg2vON5xag tDndGeXXm/WjVSYKyWx9qXaO8zaMxqOaTVUNQhMmGG+vWczNUwpjQBAqquoO3sJ5m7gI n/AA== 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=4n0b7csmummMNxZyeaSszKbcnCZgkdyzjnJK7yDR57M=; b=HWbmCwt/weg94LSO4g11znZXqS5UmSmO9OOg/XYrmZym9sZe54qOgl/l8ptJTcLPEP TISCG9xUhMTmD/oLjPvoTIXIJxVrABMxl35n22kzoXmEuWXLHbqP8vfKhFpN6Ez1eGyh Zetqp/+L195TjqJseOKmVMDDzQg42zKKiAwnu8g5piL44+Uepml7+yaXmh9QjOGI7O/7 Ynnsy2QOuDv20QNtz+Dt55wtOFc4kAcvgPlVunuetAPguKrHvgaqAcojMPvo+fykZOje npIOFpYKaOEincWo0OfAUQv88O/O4nqXojJyQLTrrzcCZvDz7HMxI2iyi+ZaU0mQG8Xw m0eA== X-Gm-Message-State: APjAAAUuE023jamUHT5i2Af834pP7UOHEWuNyzbO3DdnoUqo08Fuuf4h a21t9qQ0ubOnk1ybnXLO6qwErQ== X-Received: by 2002:ac2:5305:: with SMTP id c5mr20326251lfh.55.1574690374722; Mon, 25 Nov 2019 05:59:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 05:59:34 -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 5/7] clk: qcom: hfpll: use clk_parent_data to specify the parent Date: Mon, 25 Nov 2019 14:59:07 +0100 Message-Id: <20191125135910.679310-6-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 This permits extending the driver to other platforms without having to modify its source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- Changes since v2: -None drivers/clk/qcom/hfpll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index 225c675f6779..5ff7f5a60620 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -53,7 +53,6 @@ static int qcom_hfpll_probe(struct platform_device *pdev) struct regmap *regmap; struct clk_hfpll *h; struct clk_init_data init = { - .parent_names = (const char *[]){ "xo" }, .num_parents = 1, .ops = &clk_ops_hfpll, /* @@ -65,6 +64,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) .flags = CLK_IGNORE_UNUSED, }; int ret; + struct clk_parent_data pdata = { .index = 0 }; h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); if (!h) @@ -83,6 +83,8 @@ static int qcom_hfpll_probe(struct platform_device *pdev) 0, &init.name)) return -ENODEV; + init.parent_data = &pdata; + h->d = &hdata; h->clkr.hw.init = &init; spin_lock_init(&h->lock); -- 2.23.0