On Tue, 6 Jun 2023 12:51:50 +0200 David Schiller <david.schiller@xxxxxx> 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, > }; > > /** > > > >