From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Henk <yoda@deathstar2.nl>
Cc: linux-iio <linux-iio@vger.kernel.org>
Subject: Re: iio display large numbers
Date: Tue, 7 Dec 2021 16:13:38 +0000 [thread overview]
Message-ID: <20211207161338.000012bd@Huawei.com> (raw)
In-Reply-To: <9bd04e6d-7418-9d01-6e80-52fd7e84086f@deathstar2.nl>
On Tue, 7 Dec 2021 13:40:19 +0100
Henk <yoda@deathstar2.nl> wrote:
> Hi,
>
> I derived the LTC6951 driver from an existing analog devices LTC6952 driver.
> However for my situation this clock synthesis/buffer uses quite large
> output frequencies (2.5GHz) which does not fit in the IIO_VAL_INT size
> when retrieved with iio_info.
>
> I wonder if there is a way to represent such long integers within the
> iio_framework. I believe currently there isn't right?
>
> Regards,
>
> Henk
>
Two options for this. If the thing we are controlling is the raw channel then
we have the option to provide _scale reflecting the fact that a large value
e.g. GHz is not normally controlled at a Hz granularity.
Where that doesn't apply or the range is really very big we do have the
slightly nasty option of IIO_VAL_INT_64
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=testing&id=6bb835f3d00467c9a5e35f4955afa29df96a404e
This is very new, so not in mainline yet, though it is queued up for the
next merge window and should be linux-next.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2021-12-07 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 12:40 iio display large numbers Henk
2021-12-07 16:13 ` Jonathan Cameron [this message]
2021-12-08 6:20 ` Andy Shevchenko
2021-12-08 9:49 ` Alexandru Ardelean
2021-12-08 12:23 ` Henk
2021-12-08 12:31 ` Andy Shevchenko
[not found] <16f1078c-bbff-40ae-08b3-b1384aeb5313@deathstar2.nl>
2021-12-07 16:54 ` Henk
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=20211207161338.000012bd@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=linux-iio@vger.kernel.org \
--cc=yoda@deathstar2.nl \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.