Received: by 10.223.164.221 with SMTP id h29csp162095wrb; Thu, 12 Oct 2017 16:19:22 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC72OWEXhQRs8/qnKcNYRH+1Lx/tmZRDjaB07ADB08wOwy3qTDYhrECu4bzRup8XmSWNOSf X-Received: by 10.101.81.198 with SMTP id i6mr1426612pgq.228.1507850362731; Thu, 12 Oct 2017 16:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507850362; cv=none; d=google.com; s=arc-20160816; b=R6Oy+yehHyJ8DeWDx2RfaorELIOJKmcj4FH7sTP8EWyjhlES5am41aCOx5AWipPM29 8iRXMPTZ2Gw3Z+ud30ZNUoTo9Di6XngfZZ6/Nbt8mTMo/K086YYaV2ruHDQUKPjpvKnt yXmIZxiKZb6nxeMucFFQCi0tEYHKERgWeVQSstjUXd2al+uShNrSwGn7b9ArMpMNlA8U KRy0MyrjxsqQAgOZ4jRzFMmcxbGbJEe0JW4Co3plS1Jpuk0vGL4wGzbGrNqCuRcljIAI H0CWyOL1vEiWnvq+eGOAQA10dphqqpznjbgMKvuFyjpgul3vmZn0I6eIlL9B8++XbrKZ 3KyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=psgAgbMuYkV+IfZFy3GoJjK5UGoFCiJQfyoBidTstpU=; b=chOsxmQv0q+JuaUMbyp7PI7vYApnSui4/1aOziVMkbtQd5XmmjT/EkOZvH4wDHBSOk Y5kHIYRcDadBIVMG8kUmyiNN5w1UbbiddHCemtL/8BtJ0YKx67hBFkj6a0VL/uxMLZoJ 80kA0v68RJozYe/NdyOGp0f2ljs+bHEso+jK0whmBs2f3qyGfECzdSKfhXVl8zHJhU14 kAIqC6pjt+hz8VkXfqwP6lnTXnB8H3wbcsOWY2hImB4OgKIhyj9YWD48a5iD5c47l7+a K/THb6w9m0Jn5hHsMgl/wDPrvXnLoHo9VS0kbaN0ucrp/0Dd2tIQbtbxlOanwJvHzzDl yc7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=L1p0Q5Us; dkim=pass header.i=@codeaurora.org header.s=default header.b=OEiFkRJK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l74si615631pfg.516.2017.10.12.16.19.04; Thu, 12 Oct 2017 16:19:22 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=L1p0Q5Us; dkim=pass header.i=@codeaurora.org header.s=default header.b=OEiFkRJK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbdJLXRN (ORCPT + 99 others); Thu, 12 Oct 2017 19:17:13 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58140 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbdJLXRL (ORCPT ); Thu, 12 Oct 2017 19:17:11 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E37F16071B; Thu, 12 Oct 2017 23:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507850230; bh=ESyMeTYBgVEGNTZAuFexs1dqNEwaWdLeQlq6X5EoEYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L1p0Q5UsV9euBDHGpf7cDzBJcpPZQtgA5Be0ESu5LgwyrD+eKbU5BXklVe/zP59s5 03XIaA+1E/nGaAt7h+TGTXAwExfX0GKGNA0/gh8A4ROwguTtIZutT40cGu7qKd8chg jhDbfMDgfWAO1uEucDEGoYyJocB5yFrdcQn+bZ4g= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C3172601D2; Thu, 12 Oct 2017 23:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507850229; bh=ESyMeTYBgVEGNTZAuFexs1dqNEwaWdLeQlq6X5EoEYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OEiFkRJK1Vza7qIavX/OQ7V82I/f2EkY+NHGUOX4TTYuOCLdZmCYWYDA4yms0nUHW yuSUEXlpIfAuahkriX+gtOWbnydARyEO0BW9vN4V4uAoi/LeC71oz0HnhGEX9afm9+ /LQIuTaAnJpqXcT9CTN6SJ4rkkI6mArvDOjdX1/0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C3172601D2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Thu, 12 Oct 2017 16:17:09 -0700 From: Stephen Boyd To: Masahiro Yamada Cc: linux-clk@vger.kernel.org, Stephen Warren , linux-fbdev@vger.kernel.org, Michael Turquette , Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org, Hans de Goede , Russell King , Shawn Guo , Dong Aisheng Subject: Re: [RFC PATCH] clk: move of_clk_get_parent_count() declaration to Message-ID: <20171012231709.GH18706@codeaurora.org> References: <1507166751-2012-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507166751-2012-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/05, Masahiro Yamada wrote: > The clock consumer, drivers/video/fbdev/simplefb.c, includes > just for calling of_clk_get_parent_count(). > This is ugly. > > Looking at simplefb_clocks_get(), of_clk_get_parent_count() seems > useful for clock consumers as well as for clock providers. > > Unfortunately, we do not have a good home for declarations shared > between consumers and providers. > > Create a new header , and move it over to it. This > header must be included via or > (this is why it is prefixed with double-underscore). Add #error > so the build terminates if it is included directly. > > Signed-off-by: Masahiro Yamada > --- How about we add a get_all_the_clks_for_the_device() sort of API that uses the bulk clk code but also allocates the array by reading the number of clks from DT? Please think of a better name of course. We can figure out how to handle non-DT platforms if we need to. With clkdev we could probably handle it with some sort of lookup table search given a device name. Don't add that part until we have a user though. I assume simplefb is all DT platforms? Either way, it looks like what we really want here is a way to get every clk for a device and not look at the details. USB has a similar case, which I think Shawn Guo/Dong Aisheng was trying to add an OF based bulk clk_get() API called of_clk_bulk_get() for[1]. If this get all clks API works there too then we should use it. If it can be non-DT specific, even better. [1] http://lkml.kernel.org/r/1506415441-4435-1-git-send-email-aisheng.dong@nxp.com -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project From 1580379036941733641@xxx Thu Oct 05 01:28:17 +0000 2017 X-GM-THRID: 1580379036941733641 X-Gmail-Labels: Inbox,Category Forums