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=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E0FBEC28CC5 for ; Sat, 8 Jun 2019 12:19:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B177820693 for ; Sat, 8 Jun 2019 12:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbfFHMTU (ORCPT ); Sat, 8 Jun 2019 08:19:20 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44991 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726940AbfFHMTU (ORCPT ); Sat, 8 Jun 2019 08:19:20 -0400 Received: by mail-lf1-f68.google.com with SMTP id r15so3515702lfm.11 for ; Sat, 08 Jun 2019 05:19:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kv8LRDtu3zScEd1g2FTIJ/r2SvprFN9fflNLXUa8I4A=; b=G2v9tfnq7+nWVN8mP5BElvPkO3MHWB/jwfLANHCnsmz7EvgBz6y1A2t9wEoktbtHrf GAS0Df+aVY3M8z5FAn38Pu1cO8WcI30Mma6Fk6POvlV0WL2rAK2x7o+zLyLpxAJ0Pxu/ 5JIiHBu9Myr5/MjfvII8uC570I5F7dMqhsHkAh1iPPV2GzewRzJEZ26YDfBGci5njKOO KypyL+bWwxwRoW5OhRBfrKjt1YY2fta4aZoKUSWeW6I0k5i5viGgMXa/QwXxrIeffjTL 06TMQhBIaaPAvDhARFO3jqSiTP1MUXj7ju5WfB+YeOUnYoe8AkcXPfTSw5kqlgoM1JOP icww== X-Gm-Message-State: APjAAAVvVhQDxDtbzSbaVkSZpPVHkMQkngyUDA2jez8sUwblfjuM7N6G R8xNDtosUfulDd82SMGmWwsyECWy0Y5c07lBNOk= X-Google-Smtp-Source: APXvYqxXgq6+Qg2hLYqOYwHLwQeNuZJuuOw10MRdDNl9x9vLO2HmB+IKoDIhlcfP9HM1G9J+5Fwey5hqbIXRi1LNfjA= X-Received: by 2002:a19:6e41:: with SMTP id q1mr21765238lfk.20.1559996358398; Sat, 08 Jun 2019 05:19:18 -0700 (PDT) MIME-Version: 1.0 References: <057720844e78e615e46de34a73b16ffaf7dbfc10.1558686047.git.leonard.crestez@nxp.com> <20190607190522.D276520868@mail.kernel.org> In-Reply-To: From: Geert Uytterhoeven Date: Sat, 8 Jun 2019 14:19:06 +0200 Message-ID: Subject: Re: [PATCH] clk: Add clk_parent entry in debugfs To: Leonard Crestez Cc: Stephen Boyd , Michael Turquette , Peter De Schrijver , Geert Uytterhoeven , Greg Kroah-Hartman , "Rafael J. Wysocki" , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Hi Leonard, On Sat, Jun 8, 2019 at 9:26 AM Leonard Crestez wrote: > On 6/7/19 10:05 PM, Stephen Boyd wrote: > > Quoting Leonard Crestez (2019-05-24 01:25:25) > > >> @@ -3040,10 +3051,11 @@ static void clk_debug_create_one(struct clk_core *core, struct dentry *pdentry) > >> debugfs_create_u32("clk_enable_count", 0444, root, &core->enable_count); > >> debugfs_create_u32("clk_protect_count", 0444, root, &core->protect_count); > >> debugfs_create_u32("clk_notifier_count", 0444, root, &core->notifier_count); > >> debugfs_create_file("clk_duty_cycle", 0444, root, core, > >> &clk_duty_cycle_fops); > >> + debugfs_create_file("clk_parent", 0444, root, core, ¤t_parent_fops); > > > > Shouldn't we skip creation of this file if core->num_parents == 0? So > > put this under the if condition below? > > It's still useful to determine clk tree structure from debugfs fields, > otherwise you'd have to extract by parsing other files. > > Would you hide clk_rate for fixed-rate? I'd rather have everything > available for uniformity, even if it's otherwise constant at runtime. Unless I' missing something, there's a big difference here: all clocks have a rate, but not all clocks have a parent. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds 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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED 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 4CC34C28CC5 for ; Sat, 8 Jun 2019 12:19:35 +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 22AE820693 for ; Sat, 8 Jun 2019 12:19:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G1CTjaLL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22AE820693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IOltdCxTg0is/9TXi1vTVRYoMEHHdggZ/hMxOAxQ5FU=; b=G1CTjaLLuS5QlO FrtNeeeg66PSzzm94wRIpK+lOWv6mxkqyWDkQ5wWDQxMrM6WxfpdHXg2YsCQhPJEk36vzQ6/HGcHY QNlimc5WVqaDN0OCXO9RmTT16TllV7UHorNORh596AHZBBAqMJagg8xsC/oSVvYRYh681nM3JeFVq nXjWKnbHOqF1A72Du8M6FVUBO1zvqNcXL+0ZaUqIgCM7JXx2f2qVOAfDzXWZDZwi1kloR+NRcjXbu 4M5g7jTe7s9Q8VWycco1VPawUbDIzO7rElDktuTMViSCcgNDa6CjTWXfg7TM0VSIMjpGhm7vmOrXM AqohCTyIxx0qqlBer4Ng==; 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 1hZaJj-0004ZU-Li; Sat, 08 Jun 2019 12:19:27 +0000 Received: from mail-lf1-f66.google.com ([209.85.167.66]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hZaJf-0004Z6-6U for linux-arm-kernel@lists.infradead.org; Sat, 08 Jun 2019 12:19:24 +0000 Received: by mail-lf1-f66.google.com with SMTP id y198so3548186lfa.1 for ; Sat, 08 Jun 2019 05:19:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kv8LRDtu3zScEd1g2FTIJ/r2SvprFN9fflNLXUa8I4A=; b=NwpAnTfTj62kU3YtuPUbOKNFN9kXSl7H6iv6XRGjpo0lZIARjl8cfeB2MoT+aC+JKU mKPTbp6F7D3Q7oU0l7FmaGKOrKVtz2Vmys1kEdfJHdv+NPB64H+fxIYRAMJAUb5R6vac dG7vJDfBpLs1llZNNMtbqgXe+HWgWoYMlunneNL6sFrm9Y97Zt7jXGmiNaREzyOMv4Iy 5CcEIuxnxGeQgFxGEBXvU+1tbXAIKVgF1p8QogM6vatWQJuWowYxeIg3T6uJnAKkt56C 3+vEqRjYPfOe5RTdGLxHov1WQUHDa780CGpCkAzMG8AiaxWv+aw+VYUhsvKYdkr+Q/j4 xW4Q== X-Gm-Message-State: APjAAAXE1BYPmLnn85H9814yLuG2r8Jp5CncOiYOE1lCZPuAVub0hTTI aMhjiMAu6cI73yRLmCMloi/uD3DERBRYhpyiNNs= X-Google-Smtp-Source: APXvYqxXgq6+Qg2hLYqOYwHLwQeNuZJuuOw10MRdDNl9x9vLO2HmB+IKoDIhlcfP9HM1G9J+5Fwey5hqbIXRi1LNfjA= X-Received: by 2002:a19:6e41:: with SMTP id q1mr21765238lfk.20.1559996358398; Sat, 08 Jun 2019 05:19:18 -0700 (PDT) MIME-Version: 1.0 References: <057720844e78e615e46de34a73b16ffaf7dbfc10.1558686047.git.leonard.crestez@nxp.com> <20190607190522.D276520868@mail.kernel.org> In-Reply-To: From: Geert Uytterhoeven Date: Sat, 8 Jun 2019 14:19:06 +0200 Message-ID: Subject: Re: [PATCH] clk: Add clk_parent entry in debugfs To: Leonard Crestez X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190608_051923_241133_B4203DB2 X-CRM114-Status: GOOD ( 11.38 ) 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: Geert Uytterhoeven , "Rafael J. Wysocki" , Stephen Boyd , Greg Kroah-Hartman , Michael Turquette , "linux-clk@vger.kernel.org" , Peter De Schrijver , "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 Hi Leonard, On Sat, Jun 8, 2019 at 9:26 AM Leonard Crestez wrote: > On 6/7/19 10:05 PM, Stephen Boyd wrote: > > Quoting Leonard Crestez (2019-05-24 01:25:25) > > >> @@ -3040,10 +3051,11 @@ static void clk_debug_create_one(struct clk_core *core, struct dentry *pdentry) > >> debugfs_create_u32("clk_enable_count", 0444, root, &core->enable_count); > >> debugfs_create_u32("clk_protect_count", 0444, root, &core->protect_count); > >> debugfs_create_u32("clk_notifier_count", 0444, root, &core->notifier_count); > >> debugfs_create_file("clk_duty_cycle", 0444, root, core, > >> &clk_duty_cycle_fops); > >> + debugfs_create_file("clk_parent", 0444, root, core, ¤t_parent_fops); > > > > Shouldn't we skip creation of this file if core->num_parents == 0? So > > put this under the if condition below? > > It's still useful to determine clk tree structure from debugfs fields, > otherwise you'd have to extract by parsing other files. > > Would you hide clk_rate for fixed-rate? I'd rather have everything > available for uniformity, even if it's otherwise constant at runtime. Unless I' missing something, there's a big difference here: all clocks have a rate, but not all clocks have a parent. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel