diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2017-03-08 14:08:58 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-09 11:51:27 +0100 |
commit | 3494084017c4b7e6b44923219a9fd07689fcc2fc (patch) | |
tree | ab2b89771d9f5703cd2ccbe9dea5536abb9bf951 /drivers/serial | |
parent | a8b41f2c7266cb4fd01f68937fdc2391f10a11cf (diff) | |
download | barebox-3494084017c4b7e6b44923219a9fd07689fcc2fc.tar.gz barebox-3494084017c4b7e6b44923219a9fd07689fcc2fc.tar.xz |
of: base: Use scoring in DT device matching
Port Linux kernel algorithm for both of_device_is_compatible() and
of_match_node(). With this change former now returns a score on the
scale of 0 to INT_MAX/2, and the latter goes through all compatiblity
entries and selects the entry that has the best matching score.
This is needed for SoCs where IP blocks are backwards compatible and
corresponding OF nodes can proclaim compatibility with several entries
found in driver's compatiblity table. One such example would be PIO
pinctrl block on AT91SAM9x5 SoCs which declare compatibility with with
both "atmel,at91sam9x5-pinctrl" and "atmel,at91rm9200-pinctrl".
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial')
0 files changed, 0 insertions, 0 deletions