Re: [PATCH] generic clk API implementation for MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Jun 2007 10:37:25 +0200, Christoph Hellwig <hch@xxxxxx> 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux