All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: David Brownell <david-b@pacbell.net>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/1] ARM: OMAP: CLKFW: Initial sysfs support for omap clock framework
Date: Wed, 16 Apr 2008 13:51:19 -0700	[thread overview]
Message-ID: <20080416205119.GF17055@atomide.com> (raw)
In-Reply-To: <200804160958.17439.david-b@pacbell.net>

* David Brownell <david-b@pacbell.net> [080416 09:58]:
> On Wednesday 16 April 2008, Hiroshi DOYU wrote:
> >         omap:~# tree -d /sys/kernel/clock/omap_32k_fck/
> >         /sys/kernel/clock/omap_32k_fck/
> >         |-- gpt10_fck
> >         |-- gpt11_fck
> >         |-- gpt1_fck
> >         |-- per_32k_alwon_fck
> >         |   |-- gpio3_fck
> >         |   |-- gpio4_fck
> >         |   |-- gpio5_fck
> >         |   `-- gpio6_fck
> >         |-- ts_fck
> >         `-- wkup_32k_fck
> >             `-- gpio1_fck
> > 
> >         11 directories
> > 
> >         omap:~# tree /sys/kernel/clock/omap_32k_fck/gpt10_fck
> >         /sys/kernel/clock/omap_32k_fck/gpt10_fck
> >         |-- flags
> >         |-- rate
> >         `-- usecount
> 
> Does this need to be in sysfs?  I'd think debugfs would be
> more appropriate ... that information isn't needed for normal
> operation.
> 
> Appended is a small patch I've been carrying around.  This
> doesn't move the clocks info from procfs to debugfs, but
> that'd be an easy patch.  (Probably needs minor updates given
> the recent clocktree changes, but it still applies.  The
> coupling to the device tree is a bit weak, and I'd think
> displaying power domains would be useful too.)

Yeah, debugfs would be best. And that /proc/clocks entry will
disappear once that's available (it's currently only in l-o tree).

Tony

> - Dave
> 
> ============ CUT HERE
> Make /proc/omap_clocks show the clock hierarchy through indentation,
> and the ids for devices (like i2c and spi; but oddly not uart, gpt,
> mcbsp, or wdt) with multiple instances.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  arch/arm/plat-omap/clock.c |   23 ++++++++++++++++++++---
>  1 file changed, 20 insertions(+), 3 deletions(-)
> 
> --- a/arch/arm/plat-omap/clock.c	2007-11-23 18:29:46.000000000 -0800
> +++ b/arch/arm/plat-omap/clock.c	2007-11-23 18:45:44.000000000 -0800
> @@ -465,13 +465,30 @@ static void omap_ck_stop(struct seq_file
>  {
>  }
>  
> -int omap_ck_show(struct seq_file *m, void *v)
> +/* show clock hierarchy */
> +static void omap_cktree_show(struct seq_file *m, unsigned n, struct clk *p)
>  {
>  	struct clk *cp;
>  
> -	list_for_each_entry(cp, &clocks, node)
> -		seq_printf(m,"%s %ld %d\n", cp->name, cp->rate, cp->usecount);
> +	if (p) {
> +		seq_printf(m, "%*s%-*s %9ld Hz, use %2d",
> +			n, "", 30 - n, p->name,
> +			p->rate, p->usecount);
> +		if (p->id)
> +			seq_printf(m, " (id %d)", p->id);
> +		seq_printf(m, "\n");
> +		n += 2;
> +	}
>  
> +	list_for_each_entry(cp, &clocks, node) {
> +		if (cp->parent == p)
> +			omap_cktree_show(m, n, cp);
> +	}
> +}
> +
> +static int omap_ck_show(struct seq_file *m, void *v)
> +{
> +	omap_cktree_show(m, 0, NULL);
>  	return 0;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-04-16 20:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16  8:44 [PATCH 1/1] ARM: OMAP: CLKFW: Initial sysfs support for omap clock framework Hiroshi DOYU
2008-04-16  8:57 ` Hiroshi DOYU
2008-04-16 13:20   ` Hiroshi DOYU
2008-04-16 16:58 ` David Brownell
2008-04-16 20:51   ` Tony Lindgren [this message]
2008-04-17 14:09     ` [PATCH 1/2] ARM: OMAP: CLKFW: Initial debugfs " Hiroshi DOYU
2008-04-17 14:09       ` [PATCH 2/2] ARM: OMAP: CLKFW: Remove procfs entry for debugging " Hiroshi DOYU
2008-04-17 16:23       ` [PATCH 1/2] ARM: OMAP: CLKFW: Initial debugfs support for omap " Paul Walmsley
2008-04-17 18:40         ` David Brownell
2008-04-17 18:45           ` Paul Walmsley
2008-04-17 18:54             ` David Brownell
2008-04-17 19:17               ` Paul Walmsley
2008-04-17 18:57             ` Hiroshi DOYU
2008-04-17 19:14               ` David Brownell
2008-04-17 19:44                 ` Paul Walmsley
2008-04-17 19:49                   ` Igor Stoppa
2008-04-17 20:47                     ` Paul Walmsley
2008-04-17 21:22                       ` David Brownell
2008-04-18  7:08                       ` Igor Stoppa
2008-04-17 19:58                   ` Hiroshi DOYU
2008-04-21 18:40                     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080416205119.GF17055@atomide.com \
    --to=tony@atomide.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.