[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51EC4859.5000007@gmail.com>
Date: Sun, 21 Jul 2013 15:45:13 -0500
From: Rob Herring <robherring2@...il.com>
To: Grant Likely <grant.likely@...aro.org>
CC: Huang Shijie <b32955@...escale.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH] of: match the compatible in the order set by the dts
file
On Sat, Jul 20, 2013 at 12:44 AM, Grant Likely <grant.likely@...aro.org>
wrote:
> On Tue, 9 Jul 2013 16:10:53 +0800, Huang Shijie <b32955@...escale.com> wrote:
>> 于 2013年07月09日 15:51, Sascha Hauer 写道:
>> > On Tue, Jul 09, 2013 at 03:46:34PM +0800, Huang Shijie wrote:
>> >> 于 2013年07月09日 15:05, Sascha Hauer 写道:
>> >>> Why don't you set the matching order in the driver the way you want it
>> >>> to be, i.e.:
>> >>>
>> >>> { .compatible = "fsl,imx6q-uart", ... },
>> >>> { .compatible = "fsl,imx21-uart", ... },
>> >>> { .compatible = "fsl,imx1-uart", ... },
>> >>>
>> >> yes. i can set it like this.
>> >>
>> >> but this method looks like a ugly workaround.
>> > If a driver has different ways of supporting a single device, then
>> > putting the preferred or most feature rich on top doesn't look very ugly
>> > to me.
>> this method makes it much _coupled_ between the driver and the dts file.
>>
>> IMHO, it's an unnecessary _burden_ to the driver programmer:
>> he should puts the most feature compatible on the top.
>>
>> it's much graceful if we let the driver programmer be transparent about
>> this.
>
> Absolutely true. Applied, thanks.
We can debate whether the driver order matters or not, but either way
I'm not sure this patch does the right thing. It doesn't really look
correct to me, but I haven't dug into it.
We've already tried to fix matching and reverted the fix once before
(commit below). So this patch needs careful review and thought about
cases where the name and/or type is used to match.
commit bc51b0c22cebf5c311a6f1895fcca9f78efd0478
Author: Linus Torvalds <torvalds@...ux-foundation.org>
Date: Tue Jul 10 12:49:32 2012 -0700
Revert "of: match by compatible property first"
This reverts commit 107a84e61cdd3406c842a0e4be7efffd3a05dba6.
Meelis Roos reports a regression since 3.5-rc5 that stops Sun Fire V100
and Sun Netra X1 sparc64 machines from booting, hanging after enabling
serial console. He bisected it to commit 107a84e61cdd.
Rob Herring explains:
"The problem is match combinations of compatible plus name and/or type
fail to match correctly. I have a fix for this, but given how late it
is for 3.5 I think it is best to revert this for now. There could be
other cases that rely on the current although wrong behavior. I will
post an updated version for 3.6."
Bisected-and-reported-by: Meelis Roos <mroos@...ux.ee>
Requested-by: Rob Herring <rob.herring@...xeda.com>
Cc: Thierry Reding <thierry.reding@...onic-design.de>
Cc: Grant Likely <grant.likely@...retlab.ca>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists