From: Jonathan Cameron <jic23@kernel.org>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: benjamin.gaignard@linaro.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/6] iio: Documentation: Add IIO Generic Counter sysfs documentation
Date: Sun, 8 Oct 2017 13:10:02 +0100 [thread overview]
Message-ID: <20171008131002.3498dd91@archlinux> (raw)
In-Reply-To: <7390f98f0285ef5172df64367c0946334824db6c.1507220144.git.vilhelm.gray@gmail.com>
On Thu, 5 Oct 2017 14:13:59 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:
> This patch adds standard documentation for the userspace sysfs
> atrributes of the IIO Generic Counter Interface.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
It's a good start - but I think we need to expand on some elements.
I'm also worried that repurposing the - in here form being actual
subtraction in the differential channels is confusing.
> ---
> .../testing/sysfs-bus-iio-generic-counter-sysfs | 63 ++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-generic-counter-sysfs
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio-generic-counter-sysfs b/Documentation/ABI/testing/sysfs-bus-iio-generic-counter-sysfs
> new file mode 100644
> index 000000000000..b2c09254ec5a
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-iio-generic-counter-sysfs
> @@ -0,0 +1,63 @@
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_function
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Counter function mode for Value Y of Counter X; counter function
> + evaluation triggered by conditions specified by the
> + countX-Y_trigger_signalX-Z attributes.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_function_available
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Discrete set of available function modes for the configuration
> + of the respective Value Y of Counter X are listed in this file.
Docs need to list what they can be.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_name
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Read-only attribute that indicates the device-specific name of
> + Value Y of Counter X.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_raw
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Raw count data of Value Y of Counter X.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_triggers
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + List of Signals associated to Value Y of Counter X.
That description doesn't seem to match. This is triggers rather than signals.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_trigger_signalX-Z
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Trigger mode of Value Y for Signal Z. This attribute indicates
> + the condition of Signal Z that triggers the counter function
> + evaluation for Value Y. Both Value Y and Signal Z are part of
> + Counter X.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/countX-Y_trigger_signalX-Z_available
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Discrete set of available trigger modes are listed in this file
> + for the configuration of the respective Trigger associating
> + Signal Z of Counter X with Value Y of Counter X.
it's another case where I think overloading the - is getting confusing. Not sure
what the right answer is though!
> +
> +What: /sys/bus/iio/devices/iio:deviceX/signalX-Y_name
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Read-only attribute that indicates the device-specific name of
> + Signal Y of Counter X.
What is this name for? This doesn't feel like a counter specific thing, but
rather a generic IIO addition.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/signalX-Y_raw
> +KernelVersion: 4.14
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Raw signal data of Signal Y of Counter X.
While it might seem clunky - I'd prefer us to keep the channel direction
prefixes throughout. So that means most of these would end up as
in_signalX-Y_raw etc.
As I mentioned before I think overloading the meaning of - is probably
a bad idea. Not sure what the right option would be though.
Err. Something like in_signalX<Y>_raw? Or do we need to make it really
obvious and end up with something like.
in_signalX<CounterY>_raw - though that would require another level of
info beyond and index to describe that we are dealing with a counter
rather than a light channel for example.
I wonder if we would be better off not using the naming to reflect
the grouping at all, but rather add something like in_signalX_group
in_counterY_groupmembers which lists the members. Are we trying
to stretch the interface too far in sticking to doing it in naming?
Not sure...
Jonathan
next prev parent reply other threads:[~2017-10-08 14:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 18:13 [PATCH v3 0/6] iio: Introduce the generic counter interface William Breathitt Gray
2017-10-05 18:13 ` [PATCH v3 1/6] iio: Implement counter channel specification and IIO_SIGNAL constant William Breathitt Gray
2017-10-08 11:57 ` Jonathan Cameron
2017-10-05 18:13 ` [PATCH v3 2/6] iio: Introduce the generic counter interface William Breathitt Gray
2017-10-08 14:30 ` Jonathan Cameron
2017-10-09 12:56 ` Benjamin Gaignard
2017-10-05 18:13 ` [PATCH v3 3/6] iio: Documentation: Add IIO Generic Counter sysfs documentation William Breathitt Gray
2017-10-08 12:10 ` Jonathan Cameron [this message]
2017-10-05 18:14 ` [PATCH v3 4/6] docs: Add IIO Generic Counter Interface documentation William Breathitt Gray
2017-10-08 13:19 ` Jonathan Cameron
2017-10-05 18:14 ` [PATCH v3 5/6] iio: Add dummy counter driver William Breathitt Gray
2017-10-08 13:41 ` Jonathan Cameron
2017-10-09 12:35 ` Benjamin Gaignard
2017-10-05 18:14 ` [PATCH v3 6/6] iio: 104-quad-8: Add IIO generic counter interface support William Breathitt Gray
2017-10-08 13:44 ` Jonathan Cameron
2017-10-08 14:38 ` [PATCH v3 0/6] iio: Introduce the generic counter interface Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171008131002.3498dd91@archlinux \
--to=jic23@kernel.org \
--cc=benjamin.gaignard@linaro.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=vilhelm.gray@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).