Re: [PATCH v10 5/7] iio: add the IIO backend framework

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

 



On Fri, Feb 9, 2024 at 5:26 PM Nuno Sa <nuno.sa@xxxxxxxxxx> wrote:
>
> This is a Framework to handle complex IIO aggregate devices.
>
> The typical architecture is to have one device as the frontend device which
> can be "linked" against one or multiple backend devices. All the IIO and
> userspace interface is expected to be registers/managed by the frontend
> device which will callback into the backends when needed (to get/set
> some configuration that it does not directly control).
>
> The basic framework interface is pretty simple:
>  - Backends should register themselves with @devm_iio_backend_register()
>  - Frontend devices should get backends with @devm_iio_backend_get()

...

> +       fwnode = fwnode_find_reference(dev_fwnode(dev), "io-backends", index);
> +       if (IS_ERR(fwnode)) {
> +               dev_err_probe(dev, PTR_ERR(fwnode),
> +                             "Cannot get Firmware reference\n");
> +               return ERR_CAST(fwnode);

You can combine them in one line (yeah, a bit ugly, I know, we
discussed with Andi at some point that it would be nice to have
dev_err_probe*() family of helpers for this and other not yet covered
cases). Whatever Jonathan likes (as two or a single line), I'm fine
with this, just a side note.

> +       }

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux