[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200918121005.1d805335@nic.cz>
Date: Fri, 18 Sep 2020 12:10:05 +0200
From: Marek Behun <marek.behun@....cz>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-leds@...r.kernel.org, Pavel Machek <pavel@....cz>,
Dan Murphy <dmurphy@...com>,
Ondřej Jirman <megous@...ous.com>,
linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
devicetree@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Sean Wang <sean.wang@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang7@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH leds v2 05/50] leds: various: guard of_match_table
member value with of_match_ptr
On Fri, 18 Sep 2020 12:57:59 +0300
Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> On Fri, Sep 18, 2020 at 11:20:58AM +0200, Marek Behun wrote:
> > On Fri, 18 Sep 2020 09:15:00 +0300
> > Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> >
> > > Hi Marek,
> > >
> > > On Fri, Sep 18, 2020 at 12:32:53AM +0200, Marek Behún wrote:
> > > > Change
> > > > .of_match_table = xxx,
> > > > to
> > > > .of_match_table = of_match_ptr(xxx),
> > > > in various drivers.
> > > >
> > > > This should be standard even for drivers that depend on OF.
> > >
> > > After this patch, none of these drivers will work on ACPI systems anymore.
>
> ^
>
> If CONFIG_OF is disabled, that is.
>
> >
> > Hi Sakari,
> >
> > I don't understand. Why not? Does ACPI subsystem parse of_match_table
> > as well?
>
> It does. The compatible string is used the same way as in DT for matching
> devices with "PRP0001" _HID or _CID.
>
> Please read Documentation/firmware-guide/acpi/enumeration.rst .
>
> IOW, you can safely do the above only for drivers that depend on OF in
> Kconfig. Otherwise you'll probably break something.
>
Sakari, thank you for the pointer to the docs.
I thought that of_match_table is used only by OF (hence the name).
Marek
Powered by blists - more mailing lists