From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: David Schiller <david.schiller@jku.at>
Cc: <linux-iio@vger.kernel.org>
Subject: Re: Questions about ad5933 driver
Date: Wed, 7 Jun 2023 15:52:24 +0100 [thread overview]
Message-ID: <20230607155224.000001d0@Huawei.com> (raw)
In-Reply-To: <1204b19a92343a9e3a6ec5df3cef94f6777e08c4.camel@jku.at>
On Tue, 6 Jun 2023 12:51:50 +0200
David Schiller <david.schiller@jku.at> wrote:
> On Tue, 2023-06-06 at 11:30 +0100, Jonathan Cameron wrote:
> > Ideally clean up the driver. If you are willing that would be great,
> > if not would you be able to test changes made by someone else? You
> > are first person in years that I know has one! :) I can't remember
> > how far this driver is from being ready to move out of staging, but I
> > can probably find some time to do a thorough review of that in next
> > few weeks.
>
> Yes, I'm willing to test any patches that are provided to me. :)
> I can also try to come up with my own changes, but I'm not that familiar
> with the IIO subsystem beyond what I've learned in the past couple days,
> so I'd need some assistance.
>
> > That may require extra ABI definitions possibly including the real and
> > imag modifiers at which point your patch to libiio would be correct.
>
> Yes, that's what I though too. I wasn't sure how "official" libiio is,
> as it's not in the kernel tree.
Not 'official' though it is fairly commonly used, but the documented ABI in
Documentation/ABI/testing/sysfs-bus-iio*
is and these aren't there either.
I'm not 100% sure this is the right way to solve this ABI gap though
so need to have a bit of a think about it. Using a modifier means we can't
use them for anything else, so need to consider if there are other modifiers
(or it has meaning for differential channels) when deciding if this is
an ABI we want to add.
Thanks,
Jonathan
> My quick and dirty patch currently looks
> like this:
>
>
> diff --git a/channel.c b/channel.c
> index 469d037e..6a57a271 100644
> --- a/channel.c
> +++ b/channel.c
> @@ -114,6 +114,8 @@ static const char * const modifier_names[] = {
> [IIO_MOD_PITCH] = "pitch",
> [IIO_MOD_YAW] = "yaw",
> [IIO_MOD_ROLL] = "roll",
> + [IIO_MOD_REAL] = "real",
> + [IIO_MOD_IMAG] = "imag",
> };
>
> /*
> diff --git a/iio.h b/iio.h
> index 135e335c..3c803479 100644
> --- a/iio.h
> +++ b/iio.h
> @@ -196,6 +196,8 @@ enum iio_modifier {
> IIO_MOD_PITCH,
> IIO_MOD_YAW,
> IIO_MOD_ROLL,
> + IIO_MOD_REAL,
> + IIO_MOD_IMAG,
> };
>
> /**
>
>
>
>
next prev parent reply other threads:[~2023-06-07 14:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:46 Questions about ad5933 driver David Schiller
2023-06-06 10:30 ` Jonathan Cameron
2023-06-06 10:51 ` David Schiller
2023-06-07 14:52 ` Jonathan Cameron [this message]
2023-06-13 10:37 ` David Schiller
2023-06-17 19:28 ` 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=20230607155224.000001d0@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=david.schiller@jku.at \
--cc=linux-iio@vger.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