Re: [PATCH 1/2] ARM: OMAP: CLKFW: Initial debugfs support for omap clock framework

David Brownell
2008-04-17T18:54:05Z

On Thursday 17 April 2008, Paul Walmsley wrote:
> Hello David,
>
> On Thu, 17 Apr 2008, David Brownell wrote:
>
> > On Thursday 17 April 2008, Paul Walmsley wrote:
> > > But it would be nice to be able to call into clock functions like
> > > round_rate, set_rate, and set_parent via filesystem writes for debugging
> > > purposes, and I don't think that debugfs supports this.
> >
> > It does, if you set up the files properly ... except
> > maybe the set_parent stuff.
>
> Could you be more specific? The only write support that I see in the
> debugfs API is to store bytes into memory locations. We'd need to call
> functions also upon writes.

struct dentry *debugfs_create_file(const char *name, mode_t mode,
struct dentry *parent, void *data,
const struct file_operations *fops);

... provide a file_operations vector supporting writes. Or building
more complex values with seq_file, etc.

There are indeed lots of functions letting you create single-valued
attributes. I happen to find that model uselessly constraining,
and can't really imagine using it.

- Dave