Order in "compatibility" DT property ignored by a platform bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I was wondering how platform bus handles order of strings in the
"compatibility" property. After reading the code & testing it I
realized it doesn't.

The property should store strings ordered from the most specific to
the most generic. You could expect a more specific string to have a
priority while matching.

In platform_match there isn't any magic code for handling that. It
simply checks if a driver that was passed can support a given device.
I also did 2 quick tests with:
1) compatible = "foo", "bar";
2) compatible = "bar", "foo";
and it each case a foo platform driver was used. It just happened to
be before bar platform driver on kernel's internal list (both drivers
were built-in).

If you compare this with ARM's setup_machine_fdt you will notice that
one actually looks for the best matching machine code (it's handled
with the __of_match_node).

Am I correct understanding this isn't a proper behavior? Are there any
plans fixing this?
>From what I can see a current design with the "match" callback doesn't
allow such a change, so I guess it'd need to be reworked first? Were
there any efforts regarding that?

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux