From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F1B3C74A54 for ; Thu, 11 Jul 2019 15:06:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 181972166E for ; Thu, 11 Jul 2019 15:06:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J3CSlcx/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CWE8YcZB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 181972166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JZiJaGT8QC3lRE//8fXgnFYDWlo8MMX+KKD2NYw8q+8=; b=J3CSlcx/YGttHA QEhinThQIcm4od8ll0Bc4CYfXwT0m/P7OSoezLzEbGIV66oa79U9UIUB+alFtAa9u60DNBdBVRinI 2xi1xF6M89KzfPkX5+C83KA2ZPB03w/UZShYzFyIYqhPr9TCCLiLXRJ4HMpE9f4sk7drfhGa17nUO LlLanozJx4o6k5xD1tuvJTBGFqqh6VXJgvz+0hlVg5pXG74CwfWFEcvQi+96uqtdBuY3e1gXsp2Qh ibWGEfWgQ9KuPsYy7W2JpAWVw54Jmu7xLpShuZBYWg8b6JXXXnql22EiBC8o6Jr+/8PKh0ZI9TbJH k1zfVkv3WXcExm6b2ogg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlaeH-0006Jk-LL; Thu, 11 Jul 2019 15:06:17 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlaeE-0006JA-Cq for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2019 15:06:15 +0000 Received: by mail-pf1-x444.google.com with SMTP id i189so2888859pfg.10 for ; Thu, 11 Jul 2019 08:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4c2dc7FdeZlI40XoYW7oVDGG9akgiuTr8uhcWS8yCeY=; b=CWE8YcZB0HKcuadLXbtPYj6kQ5wYic026seg1ZVQ3b+ApPmyoYWwNSd0mnKX9ohNXA jpxMK9+dbpVEbUI8ATFDIvQDf0YLM4pcNS0tuYQfjyYMQ9NfKSEQb0kpeWX2PcE0azhP egtlCiDuPqnWZQfcZmZw8J8u1YU62gkqkX+RoS1F5r5stTmEDfwxaEJUrA2j+shkdq7J r1Zl9gWRixLrdySBL2nCQPmP0Yn4vXIIDqBK1U6Wt2gTvksAnTxve2JEFWdcui5vuI+t 56OIfwXw9RWrVLjsLcOJcFZOxIuRgyrOIDLi4Enun9yZVkuRjv1UVNzCypwA0pYfGrzv s/HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4c2dc7FdeZlI40XoYW7oVDGG9akgiuTr8uhcWS8yCeY=; b=sx06RF+EGNFfuxKjvAziChsZzRlv2IjphM8Tg+vuk5O/b+cyp4hi+rzsKG9EZ8rsAj nMPw2+SadxU6pOE9Pl5sxcHhB1t6coE7qEyuo4hKo2fPzmkW3zKpRqxOe52w9+PnNyEO iJFKlj0NotNX4MKbwP81xgAtASsDG6ZpOkfbeAhgaV7KDalXCf+RQz3eLMjys2pQOoUz ztnjbWOyv/8r77f8KiNWtwOdmQX7npBILxmVi2ywPtxy7TmcboEkB/2Oh6W2UZZ0AEWD Gw4rwcvr3bF2H3pRe1UOLVNxemeq2akdB/uPgoJjRlhg2yvelctIG8GgqNHxwbT6Ejjj 2GiA== X-Gm-Message-State: APjAAAX/dkUYYqFaP7MJdGzwodWSc1pCr+1waxzIbm/c5VI+7LwHaXsM DyWO9ZZyfaBtmMHy6snOyIz52A== X-Google-Smtp-Source: APXvYqyTRN38u90ThnFEWr3vJtVT6c/7HeHr0dQPeDSpuUgsAlIZ8GEDPOCwlDn7VSwfNYWXYmf7JA== X-Received: by 2002:a17:90a:2008:: with SMTP id n8mr5346113pjc.4.1562857573492; Thu, 11 Jul 2019 08:06:13 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id s6sm9401870pfs.122.2019.07.11.08.06.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 08:06:12 -0700 (PDT) Date: Thu, 11 Jul 2019 08:07:23 -0700 From: Bjorn Andersson To: Jorge Ramirez-Ortiz Subject: Re: [PATCH v3 06/14] clk: qcom: hfpll: get parent clock names from DT Message-ID: <20190711150723.GG7234@tuxbook-pro> References: <20190625164733.11091-1-jorge.ramirez-ortiz@linaro.org> <20190625164733.11091-7-jorge.ramirez-ortiz@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190625164733.11091-7-jorge.ramirez-ortiz@linaro.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190711_080614_445659_5B88676D X-CRM114-Status: GOOD ( 16.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, heiko@sntech.de, mturquette@baylibre.com, will.deacon@arm.com, david.brown@linaro.org, linux-clk@vger.kernel.org, jassisinghbrar@gmail.com, sibis@codeaurora.org, jagan@amarulasolutions.com, devicetree@vger.kernel.org, niklas.cassel@linaro.org, arnd@arndb.de, linux-arm-msm@vger.kernel.org, olof@lixom.net, robh+dt@kernel.org, horms+renesas@verge.net.au, linux-arm-kernel@lists.infradead.org, sboyd@kernel.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, vkoul@kernel.org, khasim.mohammed@linaro.org, enric.balletbo@collabora.com, georgi.djakov@linaro.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue 25 Jun 09:47 PDT 2019, Jorge Ramirez-Ortiz wrote: > Allow accessing the parent clock name required for the driver > operation using the device tree node. > > This permits extending the driver to other platforms without having to > modify its source code. > > For backwards compatibility leave the previous value as default. > > Co-developed-by: Niklas Cassel > Signed-off-by: Niklas Cassel > Signed-off-by: Jorge Ramirez-Ortiz The driver should be updated to use parent_data instead, but I consider that's an independent change. Reviewed-by: Bjorn Andersson > --- > drivers/clk/qcom/hfpll.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c > index a6de7101430c..87b7f46d27e0 100644 > --- a/drivers/clk/qcom/hfpll.c > +++ b/drivers/clk/qcom/hfpll.c > @@ -52,6 +52,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) > void __iomem *base; > struct regmap *regmap; > struct clk_hfpll *h; > + struct clk *pclk; > struct clk_init_data init = { > .parent_names = (const char *[]){ "xo" }, > .num_parents = 1, > @@ -75,6 +76,13 @@ static int qcom_hfpll_probe(struct platform_device *pdev) > 0, &init.name)) > return -ENODEV; > > + /* get parent clock from device tree (optional) */ > + pclk = devm_clk_get(dev, "xo"); > + if (!IS_ERR(pclk)) > + init.parent_names = (const char *[]){ __clk_get_name(pclk) }; > + else if (PTR_ERR(pclk) == -EPROBE_DEFER) > + return -EPROBE_DEFER; > + > h->d = &hdata; > h->clkr.hw.init = &init; > spin_lock_init(&h->lock); > -- > 2.21.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel