public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: David Brownell <david-b@pacbell.net>
Cc: Chandra shekhar <x0044955@ti.com>,
	'Eduardo Valentin' <edubezval@gmail.com>,
	linux-omap@vger.kernel.org,
	'Eduardo Valentin' <eduardo.valentin@indt.org.br>
Subject: Re: [PATCH 2/2] PLAT-OMAP: MCBSP: Move code mach specific from plat-omap to mach-omap
Date: Tue, 15 Apr 2008 12:09:12 -0700	[thread overview]
Message-ID: <20080415190911.GA17055@atomide.com> (raw)
In-Reply-To: <200804150952.31303.david-b@pacbell.net>

* David Brownell <david-b@pacbell.net> [080415 09:54]:
> I've not been following these McBSP issues, but this
> comment suggests to me that the clock API is just not
> being used "correctly" here:
> 
> On Tuesday 15 April 2008, Chandra shekhar wrote:
> > 1> 
> > Clock structure can be moved to header file and create a structure.
> > So that instead of calling each clock by its name,( big problem for 2430 and 34xx
> > Which has 5 mcbsp instances)  it can be called by Using mcbsp id. 
> > 
> > Something like this can be done... 
> > 
> > static char omap_mcbsp_ick[][12] = {"mcbsp1_ick\0",
> >                                                         "mcbsp2_ick\0",.........
> >                         
> >                                                         };
> > 
> > static char omap_mcbsp_fck[][12] = {"mcbsp1_fck\0",
> >                                                         "mcbsp2_fck\0",.........
> >                                                         };
> > 
> > static struct omap_mcbsp_clocks {
> >                         struct clk *ick;
> >                         struct clk *fck;
> >                         } omap_mcbsp_clk[OMAP_MAX_MCBSP_COUNT]; 
> > 
> > clk_enable(omap_mcbsp_clk[id].ick);
> > 
> > Clk_get or clk_enable/disable will be much simplified.
> 
> The "correct" way to use the clock ACPI would be like:
> 
> 	struct device *mcbsp = ... something ... ;
> 	struct clk *ick, *mck;
> 
> 	ick = clk_get(mcbsp, "ick");
> 	fck = clk_get(mcbsp, "fck");
> 
> That is, don't expect clients to use names like "mcbsp2_fck" and
> know which McBSP they're using ... just expect them to know
> they have *some* module, and that its clock has generic names
> such as "ick" and "fck".
> 
> Of course, working that way may involve a bunch of other changes...

Yes, that's right the right clock should be found automatically based
on the clock name and instance number.

Tony
--
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-15 19:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14 15:52 [PATCH 0/2] Code update for mcbsp driver Eduardo Valentin
2008-04-14 15:53 ` [PATCH 1/2] PLAT-OMAP: McBSP: Coding style cleanup on arch/arm/plat-omap/mcbsp.c Eduardo Valentin
2008-04-14 15:53   ` [PATCH 2/2] PLAT-OMAP: MCBSP: Move code mach specific from plat-omap to mach-omap Eduardo Valentin
2008-04-14 18:18     ` Felipe Balbi
2008-04-14 20:11       ` Eduardo Valentin
2008-04-14 20:11         ` Eduardo Valentin
2008-04-14 20:23           ` Felipe Balbi
2008-04-15  9:38             ` Jarkko Nikula
2008-04-15  9:41               ` Eduardo Valentin
2008-04-15 14:49           ` Chandra shekhar
2008-04-15 16:52             ` David Brownell
2008-04-15 19:09               ` Tony Lindgren [this message]
2008-04-21 18:33           ` Tony Lindgren
2008-04-22  6:29             ` Eduardo Valentin
2008-04-22  9:24               ` Syed Mohammed, Khasim
2008-04-22  9:38                 ` Jarkko Nikula
2008-04-22 10:10                   ` Syed Mohammed, Khasim
2008-04-14 18:16   ` [PATCH 1/2] PLAT-OMAP: McBSP: Coding style cleanup on arch/arm/plat-omap/mcbsp.c Felipe Balbi
2008-04-14 20:24     ` Eduardo Valentin
2008-04-14 20:24       ` Eduardo Valentin
2008-04-14 20:41         ` Felipe Balbi
2008-04-21 18:18           ` 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=20080415190911.GA17055@atomide.com \
    --to=tony@atomide.com \
    --cc=david-b@pacbell.net \
    --cc=eduardo.valentin@indt.org.br \
    --cc=edubezval@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=x0044955@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox