[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c740fb03dec9dbd45264207da96fcd2051e634f.camel@pengutronix.de>
Date: Fri, 28 Sep 2018 22:06:41 +0200
From: Lucas Stach <l.stach@...gutronix.de>
To: Frank Rowand <frowand.list@...il.com>,
Li Yang <leoyang.li@....com>, Rob Herring <robh+dt@...nel.org>,
Grant Likely <grant.likely@...retlab.ca>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, lkml <linux-kernel@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: drivers binding to device node with multiple compatible strings
Hi,
Am Freitag, den 28.09.2018, 12:43 -0700 schrieb Frank Rowand:
> + Frank
>
> On 09/27/18 15:25, Li Yang wrote:
> > Hi Rob and Grant,
> >
> > Various device tree specs are recommending to include all the
> > potential compatible strings in the device node, with the order from
> > most specific to most general. But it looks like Linux kernel doesn't
> > provide a way to bind the device to the most specific driver, however,
> > the first registered compatible driver will be bound.
> >
> > As more and more generic drivers are added to the Linux kernel, they
> > are competing with the more specific vendor drivers and causes problem
> > when both are built into the kernel. I'm wondering if there is a
> > generic solution (or in plan) to make the most specific driver bound
> > to the device. Or we have to disable the more general driver or
> > remove the more general compatible string from the device tree?
Not really contributing to the solution, but the hard question to
answer is when do you know what the most specific driver is? The most
specific driver might well be a module that can be loaded at any time,
while there might already be other less specific drivers around.
In general I would say that if your device is specific enough to
warrant a whole new driver, it should not declare compatibility with
the generic thing in the compatible, but then this is kind of exporting
an Linux implementation detail to DT.
Regards,
Lucas
Powered by blists - more mailing lists