> > While developing the hwspinlock core or a device driver, it can be
> > really helpful to change states from userspace. Add a debugsfs interface
> 
> debugfs

Yes.

> 
> > to request, free, lock, unlock, and test hwspinlocks. Because this is a
> > potentially dangerous interface, it can only be enabled via source code.
> 
> ... code,
> 
> > Similar to writeable attributes for clocks where this idea stems from.
> 
> similar ...

You mean I should merge the two sentences into one?

> > +static void hwspin_lock_low_level_debug_init(struct dentry *rootdir)
> > +{
> > +       debugfs_create_file("request", 0200, rootdir, NULL, &fops_request);
> > +       debugfs_create_file("free", 0200, rootdir, NULL, &fops_free);
> > +       debugfs_create_file("lock", 0200, rootdir, NULL, &fops_trylock_raw);
> > +       debugfs_create_file("unlock", 0200, rootdir, NULL, 
> > &fops_unlock_raw);
> > +       debugfs_create_file("test_lock", 0200, rootdir, NULL, &fops_test);
> 
> Perhaps just "test"?

Hmm, too generic for my taste. In fact, I think I should maybe rename it
to "test_single_lock" to make it more precise...

> The rest LGTM, so
> Reviewed-by: Geert Uytterhoeven <[email protected]>

Thank you!

Attachment: signature.asc
Description: PGP signature

Reply via email to