[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mips
Subject:    Re: [PATCH] generic clk API implementation for MIPS
From:       Atsushi Nemoto <anemo () mba ! ocn ! ne ! jp>
Date:       2007-06-28 9:26:46
Message-ID: 20070628.182646.129446079.nemoto () toshiba-tops ! co ! jp
[Download RAW message or body]

On Thu, 28 Jun 2007 10:37:25 +0200, Christoph Hellwig <hch@lst.de> wrote:
> > But I gave up for now ;) I will leave all implementation for platform
> > code.
> 
> I really dislike duplicating thing over architectures.  If you copy code
> from another architecture the first though should be 'could and should
> this be generic ?'.  So please try to get this lifted to common code
> instead of duplicating it.

OK, I see.  But now I think the best thing we can provide as generic
is only "no clocks" implementation.

Do you think it is worth to put into lib/ directory?

struct clk *__weak clk_get(struct device *dev, const char *id)
{
	return ERR_PTR(-ENOENT);
}
EXPORT_SYMBOL(clk_get);

int __weak clk_enable(struct clk *clk)
{
	return 0;
}
EXPORT_SYMBOL(clk_enable);

void __weak clk_disable(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_disable);

unsigned long __weak clk_get_rate(struct clk *clk)
{
	return 0;
}
EXPORT_SYMBOL(clk_get_rate);

void __weak clk_put(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_put);


This might conflict with some current implementations which export
these APIs as EXPORT_SYMBOL_GPL...

---
Atsushi Nemoto

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic