Re: [PATCH v7 3/3] hwspinlock: add low level debug capabilities
From: Wolfram Sang
Date: Wed Sep 16 2026 - 17:45:00 EST
> > 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 <geert+renesas@xxxxxxxxx>
Thank you!
Attachment:
signature.asc
Description: PGP signature