login
Header Space

 
 

Re: [PATCH 1/3] Clocklib: add generic framework for managing clocks.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Russell King <rmk+lkml@...>
Cc: Dmitry <dbaryshkov@...>, <linux-kernel@...>, <akpm@...>, <hskinnemoen@...>, <lethal@...>, <tony@...>, <paul@...>
Date: Thursday, March 27, 2008 - 5:53 am

[domen.puncer@telargo.com keeps bouncing on me, removed from Cc]

On Thu, 27 Mar 2008 09:33:01 +0000
Russell King <rmk+lkml@arm.linux.org.uk> wrote:


I don't see what this has to do with the paragraph you quoted, but
yeah, good point. I don't think it should be used as an excuse for
filling up struct clk with platform-specific crap, however.

So how about something like this?

struct clk_ops {
	struct module	*owner;

	int (*can_get)	(struct clk *, struct device *);
	int (*set_parent) (struct clk *, struct clk *);
	int (*enable)	(struct clk *);
	void (*disable)	(struct clk *);
	unsigned long (*getrate) (struct clk*);
	int (*setrate)	(struct clk *, unsigned long);
	long (*roundrate) (struct clk *, unsigned long);
};

struct clk {
	struct list_head node;
	struct clk	*parent;

	const char	*name;
	int		users;

	const struct clk_ops *ops;
};

Haavard
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] Clocklib: generic clocks framework, Dmitry Baryshkov, (Wed Mar 26, 11:49 am)
[PATCH 4/4] Clocklib: support ARM pxa sub-arch., Dmitry Baryshkov, (Wed Mar 26, 12:17 pm)
[PATCH 3/3] Clocklib: support sa1100 sub-arch., Dmitry Baryshkov, (Wed Mar 26, 11:53 am)
[PATCH 2/3] Clocklib: debugfs support, Dmitry Baryshkov, (Wed Mar 26, 11:52 am)
[PATCH 1/3] Clocklib: add generic framework for managing clo..., Dmitry Baryshkov, (Wed Mar 26, 11:52 am)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Wed Mar 26, 12:04 pm)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Sat Mar 29, 8:36 am)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Thu Mar 27, 5:06 am)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Thu Mar 27, 5:26 am)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Thu Mar 27, 5:53 am)
Re: [PATCH 1/3] Clocklib: add generic framework for managing..., Haavard Skinnemoen, (Thu Mar 27, 6:20 am)
speck-geostationary