Re: [PATCH v2 09/11] iio: backend: add new functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2024-04-06 at 17:32 +0100, Jonathan Cameron wrote:
> On Fri, 5 Apr 2024 17:00:07 +0200
> Nuno Sa <nuno.sa@xxxxxxxxxx> wrote:
> 
> > This adds the needed backend ops for supporting a backend inerfacing
> > with an high speed dac. The new ops are:
> > 
> > * data_source_set();
> > * set_sampling_freq();
> > * extend_chan_spec();
> > * ext_info_set();
> > * ext_info_get().
> > 
> > Also to note the new helpers that are meant to be used by the backends
> > when extending an IIO channel (adding extended info):
> > 
> > * iio_backend_ext_info_set();
> > * iio_backend_ext_info_get().
> > 
> > Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx>
> 
> Whilst the code for the backend retrieval callback is simple
> I wonder if we are better off just not having it for now.
> 
> Keep the infrastructure that checks for the default approach not working
> but don't actually provide the alternative until we need it.
> 

Yeps, agreed. That's why I brought it up in the cover. I'll place a comment
stating we're aware and what may be the proper solution and have it when needed.

> Advantage is pretty minor though so maybe just keep it.
> Unless others have strong opinions, up to you to decide whether to keep it.

> One trivial thing noticed inline.
> 
> > ---
> >  drivers/iio/industrialio-backend.c | 179
> > +++++++++++++++++++++++++++++++++++++
> >  include/linux/iio/backend.h        |  49 ++++++++++
> >  2 files changed, 228 insertions(+)
> > 
> > diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-
> > backend.c
> > index 2fea2bbbe47f..ac554798897f 100644
> > --- a/drivers/iio/industrialio-backend.c
> > +++ b/drivers/iio/industrialio-backend.c
> > @@ -29,6 +29,7 @@
> >   *
> >   * Copyright (C) 2023-2024 Analog Devices Inc.
> >   */
> > +#include "asm-generic/errno-base.h"
> 
> You'll need a strong reason if you want to do that include rather than
> a normal one like linux/errno.h
> 

Hmm crap, Fairly sure this was clangd automatically adding the header file.
Sometimes it's actually useful. Not in this case :)

- Nuno Sá
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux