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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable 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 37FF5C43219 for ; Thu, 25 Apr 2019 21:42:44 +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 3F2CE2064A for ; Thu, 25 Apr 2019 21:42:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O+Ef7rHN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nfgMBpn0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F2CE2064A 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:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d4nU8bkZdBHN5qQB/fRAEENlN3kVXASKF+/9N8DwD/Q=; b=O+Ef7rHN5RI+vn Oqdh8eRTW/YpaBwFci2fhXwn5Lzi2ot4VYb/cSZNgUeuP9mZCssd1FVJdwjDhOzhLntBxeSpqoU8+ qr0x91eXpDLrUL4QMcIyFgWVdD5gTHNQ313fOJU1ZuN04cvYSG69tb9D1yZ3j9utX+7+/G9C8dwbP OXs8p4Uzof+A39IusYYpoiNCP6pRf0rnrmtbmTxsg4dLnzLOOHBi8YnfWugNalKN+HZiWjCFLKDJq EXzlXo4OMtk9mG8gMH9Gm+7fz38mjLwJ2ZsfWWKQ9UGuCWAWc4ueb7bmhwQ7VLBU9XDm8bdI/C1Xu HVaLsdFS3rPmaAN+wWNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJm8c-0004DV-Ar; Thu, 25 Apr 2019 21:42:38 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJm8Z-0004Ct-Do for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2019 21:42:36 +0000 Received: by mail-wm1-x341.google.com with SMTP id j13so1097140wmh.2 for ; Thu, 25 Apr 2019 14:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Iy3NdgbIw8q0NrLQWP14D1k9PBg9PXIezpgxK2Kpvt8=; b=nfgMBpn0VLzv2y/39VvisZXvwl0g1ff0uEVrQFqtXEi+IjoMh0ZHIIbnOUsw5fsd/W FKm7EGq74Ds+UYYPiIaWus6jzqCbkrCKQezGRCuxfUrwkhnQnHPa3hYGuJu1SHMUr92y eCqShVUazsp1eADb8LFYI9KDlPbp1O+bU2NAhXH3gosVTIqdi5ExCp1RM2CFopWlGzhh 2G5AKktg6e3NfrwnB89I2GG7Y4FT/ujBmIq4ERjCgXg1ZX/gPtn31Rwr8O9yHyUNLHQ4 5ElWbbGsOnBurVQ5t4vqkNjpqrWeJuEKOEwVsuU9eHjt+AbJEPfQ0J03wmmeVqSH0t4c /14w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Iy3NdgbIw8q0NrLQWP14D1k9PBg9PXIezpgxK2Kpvt8=; b=sfLyDUCevfJ7OldAIqG4IHvfrNVLUtxPR+OpWkKIXw5lOxyOKVN8JxAamdxQilA4J9 y6TFHHe2S5CTmPf1RXJfTgw2COqnCPaTVwJT8miGvu7z80VwoKqCRpWHkbYuqmty2an4 CzKweevjCgcQB4vqaJTgF5AuDbkQEdTcuQ/4Oe0/0cP7GM7v/41Ki+X42GXW7Gekc0v+ HIxWmHQnlGi9lHpyUF8SNt6kDVxj5f9CiDMORHc67zGRVF8Dzdc3ZEGGN4BtUX1vJr/+ 25BuUyMJnp3giNUc+0d0TmxAVbhh19oCNfi1GzyDDC85ZZNH6rAoAtI9ZYMEjgG6XieK toEw== X-Gm-Message-State: APjAAAWL6wXqcCnGBJC5eLA6z5dxYFWKOjOMikW/clvXCxP9aijxU3lJ R0ssRSeKLQGTQh2QboC6L9SgVw== X-Google-Smtp-Source: APXvYqzqP3+gjk2J3h2F6CDZLSJq96Xih8o53HRzjnXMD79MSmH/RZ8anTbJATFtknEflg3sGCfVEQ== X-Received: by 2002:a1c:7005:: with SMTP id l5mr1521684wmc.149.1556228553779; Thu, 25 Apr 2019 14:42:33 -0700 (PDT) Received: from [192.168.1.2] (200.red-83-34-200.dynamicip.rima-tde.net. [83.34.200.200]) by smtp.gmail.com with ESMTPSA id r196sm22224312wmf.22.2019.04.25.14.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 14:42:32 -0700 (PDT) Subject: Re: [PATCH v2 05/14] clk: qcom: apcs-msm8916: get parent clock names from DT To: Stephen Boyd , andy.gross@linaro.org, arnd@arndb.de, bjorn.andersson@linaro.org, david.brown@linaro.org, enric.balletbo@collabora.com, heiko@sntech.de, horms+renesas@verge.net.au, jagan@amarulasolutions.com, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, olof@lixom.net, robh+dt@kernel.org, sibis@codeaurora.org, will.deacon@arm.com References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> <1548700381-22376-6-git-send-email-jorge.ramirez-ortiz@linaro.org> <155085910216.77512.12604271825136479370@swboyd.mtv.corp.google.com> <31e17283-c374-f16e-df95-09aaf1854435@linaro.org> <155622774551.15276.4140891469702307355@swboyd.mtv.corp.google.com> From: Jorge Ramirez Message-ID: <5d17334c-ed2f-5112-dba6-72a050bfd1b2@linaro.org> Date: Thu, 25 Apr 2019 23:42:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <155622774551.15276.4140891469702307355@swboyd.mtv.corp.google.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_144235_463514_AB354E90 X-CRM114-Status: GOOD ( 20.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, linux-clk@vger.kernel.org, vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, linux-arm-kernel@lists.infradead.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 4/25/19 23:29, Stephen Boyd wrote: > Quoting Jorge Ramirez (2019-04-22 04:44:50) >> On 2/22/19 19:11, Stephen Boyd wrote: >>> Quoting Jorge Ramirez-Ortiz (2019-01-28 10:32:52) >>>> @@ -61,6 +65,25 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) >>>> if (!a53cc) >>>> return -ENOMEM; >>>> >>>> + /* check if the parent names are present in the device tree */ >>> >>> This looks odd. >>> >>>> + ret = devm_clk_bulk_get(parent, ARRAY_SIZE(pclks), pclks); >>>> + if (ret == -EPROBE_DEFER) >>>> + return ret; >>> >>> Why can't we use of_clk_parent_fill() if we know this is always a DT >>> platform? The parent clks may not be registered at the time of probe? >> >> yes, and AFAICS the important thing at this point is that the clock is >> registered hence the handling of defer. >> >> I could use of_clk_parent_fill and then - if needed - call >> devm_clk_bulk_get but I am not sure of the gains of doing it (wouldnt >> this just make the code more confusing?) > > Yeah of_clk_parent_fill() isn't the best approach. But it at least keeps > this driver from using clk consumer APIs? ok will do that then. > >> >> >>> Maybe this series should wait for the parent registration stuff I'm >>> working on so that this can be made simpler. >> >> the need for the clock name is not intrinsic to this driver (the driver >> itself doesnt use these names) but it just feeds these to the framework. >> >> I was looking into your parent registration code and I am not sure how >> can I use it in this particular driver other than simply removing the >> names and hoping that things are handled properly at the lower >> levels.... could you clarify please? >> > > I think so. I've forgotten the context of this patch, but the general > idea would be to specify the parents with clock-names or DT index in the > DT node for the clks registered here and not use of_clk_parent_fill() or > do any sort of devm_clk_bulk_get() calls. Then the framework will take > care of finding the parents for the clks and hooking things up properly > for the parent-child relationship. > > ok will try that. thanks for confirming! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel