[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZC0zyM3zEHYG/PLF@smile.fi.intel.com>
Date: Wed, 5 Apr 2023 11:39:36 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Martin Zaťovič <m.zatovic1@...il.com>,
linux-kernel@...r.kernel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, gregkh@...uxfoundation.org,
airlied@...hat.com, dipenp@...dia.com, treding@...dia.com,
mwen@...lia.com, fmdefrancesco@...il.com, arnd@...db.de,
bvanassche@....org, ogabbay@...nel.org, axboe@...nel.dk,
mathieu.poirier@...aro.org, linux@...y.sk, masahiroy@...nel.org,
yangyicong@...ilicon.com, dan.j.williams@...el.com,
jacek.lawrynowicz@...ux.intel.com, benjamin.tissoires@...hat.com,
devicetree@...r.kernel.org, furong.zhou@...ux.intel.com
Subject: Re: [PATCHv3 2/4] wiegand: add Wiegand bus driver
On Tue, Apr 04, 2023 at 10:30:59PM +0200, Linus Walleij wrote:
> On Tue, Apr 4, 2023 at 3:13 PM Martin Zaťovič <m.zatovic1@...il.com> wrote:
> > On Wed, Mar 01, 2023 at 06:23:54PM +0200, Andy Shevchenko wrote:
...
> > > > +/**
> > > > + * of_register_wiegand_device - allocates and registers a new Wiegand device based on devicetree
> > >
> > > NAK for OF only code. New, esp. bus, code must be agnostic. We have all means
> > > for that.
> >
> > In one of the previous versions of this patch series, there was also the possibility to instantiate
> > the device from another driver. I have been told, that this is not the way to go anymore, unless
> > there is a very specific reason for that. I did not find such reason, so I have removed this suport.
>
> I don't know for sure but I think Andy simply means that you should take a look
> in include/linux/property.h and replace every function named of_* with
> the corresponding fwnode_* or device_* function from that file, and it
> should all just magically work the same, but abstracted away from device
> tree. It's not much more than a search/replace and rename operation
> (unless there is a "hole" in the fwnode implementations... I hope not.)
>
> In the end you can keep just <linux/property.h> and drop <linux/of.h>
> and <linux/of_device.h> if this works.
Yes. And the argument for embedded devices it's exactly why the non-OF
interface is needed as we want to have a possibility to connect devices on
ACPI (or another, if any) based platform without changing the code.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists