diff mbox series

[v3,bus+gpio,3/5] bus: moxtet: Add sysfs documentation

Message ID 20190301035852.26780-4-marek.behun@nic.cz
State New
Headers show
Series Add Moxtet bus and GPIO over Moxtet bus | expand

Commit Message

Marek Behún March 1, 2019, 3:58 a.m. UTC
Add sysfs ABI documentation for the attribute files module_id,
module_name, input_value and output_value of Moxtet devices.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 .../ABI/testing/sysfs-bus-moxtet-devices      | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-moxtet-devices

Comments

Linus Walleij March 1, 2019, 2:34 p.m. UTC | #1
On Fri, Mar 1, 2019 at 4:59 AM Marek Behún <marek.behun@nic.cz> wrote:

> Add sysfs ABI documentation for the attribute files module_id,
> module_name, input_value and output_value of Moxtet devices.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>

(...)
> +++ b/Documentation/ABI/testing/sysfs-bus-moxtet-devices
> @@ -0,0 +1,25 @@
> +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_id
> +Date:          March 2019
> +KernelVersion: 5.2
> +Contact:       Marek Behún <marek.behun@nic.cz>
> +Description:   (R) Moxtet module ID. Format: %x
> +
> +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_name
> +Date:          March 2019
> +KernelVersion: 5.2
> +Contact:       Marek Behún <marek.behun@nic.cz>
> +Description:   (R) Moxtet module name. Format: string

These look good.

> +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/input_value
> +Date:          March 2019
> +KernelVersion: 5.2
> +Contact:       Marek Behún <marek.behun@nic.cz>
> +Description:   (R) Read input value from module at this Moxtet address.
> +               Format: %x
> +
> +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/output_value
> +Date:          March 2019
> +KernelVersion: 5.2
> +Contact:       Marek Behún <marek.behun@nic.cz>
> +Description:   (RW) Read last written value or write value to the module on
> +               this Moxtet address. Format: %x

What is the usecase for these?

If this is for debugging it should be in debugfs rather than in sysfs.

If it is here for random userspace drivers, we need some good explanation
as to why they can't just be kernel drivers.

Yours,
Linus Walleij
Marek Behún March 1, 2019, 3:15 p.m. UTC | #2
On Fri, 1 Mar 2019 15:34:26 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:

> > +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/output_value
> > +Date:          March 2019
> > +KernelVersion: 5.2
> > +Contact:       Marek Behún <marek.behun@nic.cz>
> > +Description:   (RW) Read last written value or write value to the
> > module on
> > +               this Moxtet address. Format: %x  
> 
> What is the usecase for these?
> 
> If this is for debugging it should be in debugfs rather than in sysfs.
> 
> If it is here for random userspace drivers, we need some good
> explanation as to why they can't just be kernel drivers.

Hmm, it was for debugging purposes but the ability to write there is
not needed anymore... Shall I make it read/only? Or completely remove
it?

Marek
Linus Walleij March 4, 2019, 12:07 p.m. UTC | #3
On Fri, Mar 1, 2019 at 4:15 PM Marek Behun <marek.behun@nic.cz> wrote:

> On Fri, 1 Mar 2019 15:34:26 +0100
> Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > > +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/output_value
> > > +Date:          March 2019
> > > +KernelVersion: 5.2
> > > +Contact:       Marek Behún <marek.behun@nic.cz>
> > > +Description:   (RW) Read last written value or write value to the
> > > module on
> > > +               this Moxtet address. Format: %x
> >
> > What is the usecase for these?
> >
> > If this is for debugging it should be in debugfs rather than in sysfs.
> >
> > If it is here for random userspace drivers, we need some good
> > explanation as to why they can't just be kernel drivers.
>
> Hmm, it was for debugging purposes but the ability to write there is
> not needed anymore... Shall I make it read/only? Or completely remove
> it?

I would either remove it or move it to debugfs.

Yours,
Linus Walleij
Arnd Bergmann March 5, 2019, 11:11 a.m. UTC | #4
On Mon, Mar 4, 2019 at 1:08 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Mar 1, 2019 at 4:15 PM Marek Behun <marek.behun@nic.cz> wrote:
>
> > On Fri, 1 Mar 2019 15:34:26 +0100
> > Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > > > +What:          /sys/bus/moxtet/devices/moxtet-<name>.<addr>/output_value
> > > > +Date:          March 2019
> > > > +KernelVersion: 5.2
> > > > +Contact:       Marek Behún <marek.behun@nic.cz>
> > > > +Description:   (RW) Read last written value or write value to the
> > > > module on
> > > > +               this Moxtet address. Format: %x
> > >
> > > What is the usecase for these?
> > >
> > > If this is for debugging it should be in debugfs rather than in sysfs.
> > >
> > > If it is here for random userspace drivers, we need some good
> > > explanation as to why they can't just be kernel drivers.

I had the same thought, and then saw you already commented.

> > Hmm, it was for debugging purposes but the ability to write there is
> > not needed anymore... Shall I make it read/only? Or completely remove
> > it?
>
> I would either remove it or move it to debugfs.

How about removing it for the initial submission? Then we
can see if it's still needed later and discuss how it should be
done when we need it.

     Arnd
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-moxtet-devices b/Documentation/ABI/testing/sysfs-bus-moxtet-devices
new file mode 100644
index 000000000000..80bae358a90c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-moxtet-devices
@@ -0,0 +1,25 @@ 
+What:		/sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_id
+Date:		March 2019
+KernelVersion:	5.2
+Contact:	Marek Behún <marek.behun@nic.cz>
+Description:	(R) Moxtet module ID. Format: %x
+
+What:		/sys/bus/moxtet/devices/moxtet-<name>.<addr>/module_name
+Date:		March 2019
+KernelVersion:	5.2
+Contact:	Marek Behún <marek.behun@nic.cz>
+Description:	(R) Moxtet module name. Format: string
+
+What:		/sys/bus/moxtet/devices/moxtet-<name>.<addr>/input_value
+Date:		March 2019
+KernelVersion:	5.2
+Contact:	Marek Behún <marek.behun@nic.cz>
+Description:	(R) Read input value from module at this Moxtet address.
+		Format: %x
+
+What:		/sys/bus/moxtet/devices/moxtet-<name>.<addr>/output_value
+Date:		March 2019
+KernelVersion:	5.2
+Contact:	Marek Behún <marek.behun@nic.cz>
+Description:	(RW) Read last written value or write value to the module on
+		this Moxtet address. Format: %x