> -----Original Message-----
> From: Paul Walmsley [mailto:[email protected]]
> Sent: Wednesday, August 11, 2010 11:17 AM
> To: Basak, Partha
> Cc: Kevin Hilman; Varadarajan, Charulatha; [email protected];
> Cousson, Benoit; Nayak, Rajendra
> Subject: RE: [PATCH 10/13 v5] OMAP: GPIO: Implement GPIO as a platform
> device
>
> On Tue, 10 Aug 2010, Basak, Partha wrote:
>
> > As per our discussion with Paul & you during workshop, I believe,
> > optional clock control should be done using clock APIs. So, I would go
> > by your suggestion 1 of exposing an API to expose the optional clocks in
> > the hwmod, something like:
> >
> > struct omap_hwmod_opt_clk * omap_hwmod_get_opt_clks(struct omap_hwmod
> > *oh);
> >
> > If agreed, Charu will send updated patch.
>
> This should be done by modifying the hwmod code to call clk_add_alias()
> for the clock names for the optional clocks. I don't think any extra API
> is needed.
>
Lets see, if I got it right:
Refer to the OMAP3 hwmod data-base (omap_hwmod_3xxx.c):
static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
{ .role = "dbclk", .clk = "gpio1_dbck", },
};
Clock database(Clock3xxx_data.c):
CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX),
Refer to the OMAP4 hwmod database(omap_hwmod_44xx.c):
static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
{ .role = "dbclk", .clk = "sys_32k_ck" },
Clock database(Clock44xx_data.c):
CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X),
/*int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
struct device *dev);*/
I believe, you are suggesting to do the following in the hwmod framework, say
_setup(?):
clk_add_alias ( <gpio1_>opt_clks.role,
oh->od.pdev.name,
<gpio1_>opt_clks.clk,
NULL);
Then, from the driver, we can simply do a
clk_get(dev_ptr,
<role-->"dbclk">); /*hard-coded in the driver to be
same as in the hwmod database*/
>
> - Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html