From: Jonathan Cameron <jic23@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] Documentation: ABI: testing: adf4377: add ABI docs
Date: Sun, 6 Nov 2022 17:58:39 +0000 [thread overview]
Message-ID: <20221106175604.061b8662@jic23-huawei> (raw)
In-Reply-To: <20221104092802.90725-4-antoniu.miclaus@analog.com>
On Fri, 4 Nov 2022 11:28:01 +0200
Antoniu Miclaus <antoniu.miclaus@analog.com> wrote:
> Add documentation for the use of the output frequency and muxout select.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Hi Antoniu,
A few questions inline.
> ---
> .../testing/sysfs-bus-iio-frequency-adf4377 | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4377
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4377 b/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4377
> new file mode 100644
> index 000000000000..0324de5c9328
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4377
> @@ -0,0 +1,32 @@
> +What: /sys/bus/iio/devices/iio:deviceX/frequency
> +KernelVersion:
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Stores the PLL frequency in Hz for output channels.
> + Reading returns the frequency in Hz.
I'm a little confused. Should we not tie this to the output channels?
out_altvoltageX_frequency
> +
> +What: /sys/bus/iio/devices/iio:deviceX/muxout_select
Why would userspace change this?
I'd sort of expect this to typically be chosen by what it is physically wired
up to.
You could treat muxout_low and muxout_high as a gpio (possibly high_z as well).
If that were the case, then device tree binding should allow you detect that usecase.
Lock detector is normally wired to a GPI so that software can check if the lock is
successful (or it's wired to some other circuits we can't see). The two
clock dividers should be represented as a clock provider.
Note this is partly driven by my desire to keep custom ABI to the minimum because
it is rare that userspace has a clue what to do with it. That is probably less
of a consideration here though as I doubt this device is going to be much used
with software stacks that don't know exactly what it is.
Jonathan
> +KernelVersion:
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + The mux output allows the user to access various internal points on
> + the chip. Valid values that can be written are:
> + * high_z -> high impedance output
> + * lock_detect -> digital lock detector output
> + * muxout_low -> low output
> + * f_div_rclk_2 -> fdiv_rclk/2
> + * f_div_nclk_2 -> fdiv_nclk/2
> + * muxout_high -> high output
> +
> +What: /sys/bus/iio/devices/iio:deviceX/muxout_select_available
> +KernelVersion:
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Reading this returns the valid values that can be written to the
> + muxout_mode attribute:
> + * high_z
> + * lock_detect
> + * muxout_low
> + * f_div_rclk_2
> + * f_div_nclk_2
> + * muxout_high
next prev parent reply other threads:[~2022-11-06 17:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 9:27 [PATCH 0/3] Add support for ADF4377 Antoniu Miclaus
2022-11-04 9:27 ` [PATCH 1/4] dt-bindings: iio: frequency: add adf4377 doc Antoniu Miclaus
2022-11-04 13:21 ` Krzysztof Kozlowski
2022-11-06 17:39 ` Jonathan Cameron
2022-11-04 9:28 ` [PATCH 2/4] iio: frequency: adf4377: add support for ADF4377 Antoniu Miclaus
2022-11-04 9:46 ` Christophe JAILLET
2022-11-04 11:38 ` Nuno Sá
2022-11-06 17:51 ` Jonathan Cameron
2022-11-15 12:36 ` Nuno Sá
2022-11-15 16:09 ` Jonathan Cameron
2022-11-06 18:35 ` Jonathan Cameron
2022-11-04 9:28 ` [PATCH 3/4] Documentation: ABI: testing: adf4377: add ABI docs Antoniu Miclaus
2022-11-06 17:58 ` Jonathan Cameron [this message]
2022-11-04 9:28 ` [PATCH 4/4] MAINTAINERS: add maintainer for ADF4377 driver Antoniu Miclaus
2022-11-04 11:14 ` Nuno Sá
2022-11-06 17:40 ` [PATCH 0/3] Add support for ADF4377 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=20221106175604.061b8662@jic23-huawei \
--to=jic23@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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