[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VeemaMFCLncFAF24RU6kEbj=9F3w5LWjA-o-uky=pO=5w@mail.gmail.com>
Date: Mon, 15 Nov 2021 14:13:43 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Anand Ashok Dumbre <ANANDASH@...inx.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio <linux-iio@...r.kernel.org>, git <git@...inx.com>,
Michal Simek <michals@...inx.com>,
Peter Meerwald <pmeerw@...erw.net>,
devicetree <devicetree@...r.kernel.org>,
Manish Narani <MNARANI@...inx.com>
Subject: Re: [PATCH v8 2/4] iio: adc: Add Xilinx AMS driver
On Mon, Nov 15, 2021 at 1:59 PM Anand Ashok Dumbre <ANANDASH@...inx.com> wrote:
...
> > > > + ams->pl_base = of_iomap(node, 0);
> > >
> > > Hmm. So of_iomap() leaves us dependent on dt specific calls. Whilst it
> > > doesn't exactly look hard to create a generic version covering at
> > > least dt and acpi I don' think there is an equivalent acpi function currently
> > defined.
> > >
> > > Andy, do you think this is a good thing to add to the generic firmware
> > > node handling? It's a bit specialist as most of the time this will be
> > > wrapped up in the platform device handling or similar rather than being in a
> > child node like this.
> >
> > I saw this issue previously somewhere else and we can do something about
> > it.
> > But first (before going to ACPI guts) we may indeed introduce a basic
> > skeleton under fwnode API for this.
> >
> > Something like
> >
> > void __iomem *fwnode_iomap(...)
> > {
> > if (is_of_node(fwnode))
> > return of_iomap();
> > return NULL;
> > }
> > EXPORT_SYMBOL_GPL(fwnode_iomap);
> >
> > At least it will allow drivers to make them property provider agnostic.
> >
> > Okay, I checked the current version of the ACPI specification and the
> > proposed DTS here. With above API and something like
> >
> > Device (AMS0) {
> > Name (_CRS, ...)
> > ...
> > Device (PLMN) {
> > Name (_CRS, ...)
> > }
> > Device (PSMN) {
> > Name (_CRS, ...)
> > }
> > }
> >
> > we may get the resource from the corresponding fwnode's _CRS object
>
> Just to be sure, do I need to do anything for this in this iteration?
Can you provide a helper to drivers/base/property.h for the X-node
iomap() to be agnostic?
(X - SW, FW, ...)
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists