2017-12-27 12:55:14 -06:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
2014-02-10 22:01:48 +01:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
2012-12-06 14:55:41 -08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2012-12-06 14:55:41 -08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
2010-02-14 07:13:55 -07:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2014-11-27 17:56:07 +00:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-17 10:42:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-08 19:59:20 +03:00
|
|
|
|
2013-09-17 10:42:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-14 15:28:24 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
2015-05-14 15:28:24 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2012-11-06 21:03:27 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-08 05:19:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-15 23:25:43 -06:00
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-04 17:24:26 +01:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2013-10-04 17:24:26 +01:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 12:05:27 +09:00
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
|
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-20 10:18:46 +09:00
|
|
|
|
|
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
|
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-02 11:25:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2016-07-08 08:35:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:00 -08:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
|
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Fix __of_device_is_available check
From IEEE 1275, there defined a standard 'status' property indicating the
operational status of one device. The 'status' property has four possible
values: 'okay/ok', 'disabled', 'fail' and 'fail-xxx'.
If it is absent, that means the status of the device is unknown or okay.
The __of_device_is_available checks the state of the 'status' property of
a device. If the property is absent or set to 'okay/ok', it returns 1.
Otherwise it returns 0.
While in __of_device_is_available:
> status = of_get_property(device, "status", &statlen);
> if (status == NULL)
> return 1;
The status value returned from 'of_get_property()' will be NULL in two cases:
Firstly: the 'device' value (device node) is NULL.
Secondly: the 'status' property is actaully not exist.
If the device node is NULL, the __of_device_is_available will return true,
that will mean the absent state of the 'status' property.
So this add the device node check before checking the 'status' property's
state, and if the device node is not exist, 0 will be returned.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-01-13 11:07:28 +08:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
of: Fix __of_device_is_available check
From IEEE 1275, there defined a standard 'status' property indicating the
operational status of one device. The 'status' property has four possible
values: 'okay/ok', 'disabled', 'fail' and 'fail-xxx'.
If it is absent, that means the status of the device is unknown or okay.
The __of_device_is_available checks the state of the 'status' property of
a device. If the property is absent or set to 'okay/ok', it returns 1.
Otherwise it returns 0.
While in __of_device_is_available:
> status = of_get_property(device, "status", &statlen);
> if (status == NULL)
> return 1;
The status value returned from 'of_get_property()' will be NULL in two cases:
Firstly: the 'device' value (device node) is NULL.
Secondly: the 'status' property is actaully not exist.
If the device node is NULL, the __of_device_is_available will return true,
that will mean the absent state of the 'status' property.
So this add the device node check before checking the 'status' property's
state, and if the device node is not exist, 0 will be returned.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-01-13 11:07:28 +08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
|
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
2015-04-09 13:05:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2013-04-02 12:28:11 -03:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-28 10:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-19 14:03:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
2014-05-28 10:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-17 16:36:31 -07:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-06 16:52:53 +00:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2015-03-17 12:30:31 -07:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 18:00:00 -05:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-02 12:43:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-06 16:52:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2017-06-02 12:43:18 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-17 08:53:21 -08:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2017-11-17 08:53:21 -08:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Revert "OF: base: match each node compatible against all given matches first"
This reverts commit 105353145eafb3ea919f5cdeb652a9d8f270228e.
Stephen Chivers reported this is broken as we will get a match
entry '.type = "serial"' instead of the '.compatible = "ns16550"'
in the following scenario:
serial0: serial@4500 {
compatible = "fsl,ns16550", "ns16550";
}
struct of_device_id of_platform_serial_table[] = {
{ .compatible = "ns8250", .data = (void *)PORT_8250, },
{ .compatible = "ns16450", .data = (void *)PORT_16450, },
{ .compatible = "ns16550a", .data = (void *)PORT_16550A, },
{ .compatible = "ns16550", .data = (void *)PORT_16550, },
{ .compatible = "ns16750", .data = (void *)PORT_16750, },
{ .compatible = "ns16850", .data = (void *)PORT_16850, },
...
{ .type = "serial", .data = (void *)PORT_UNKNOWN, },
{ /* end of list */ },
};
So just revert this patch, we will use another implementation to find
the best compatible match in a follow-on patch.
Reported-by: Stephen N Chivers <schivers@csc.com.au>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2014-02-14 13:22:45 +08:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:54 +02:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-18 15:57:29 +08:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2012-12-19 10:45:36 +00:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
|
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
2014-10-02 13:08:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-11 22:05:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2016-12-01 09:00:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-11 22:05:10 +01:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2012-06-29 13:57:58 +09:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 01:31:16 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 01:31:16 +00:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:20 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
2013-04-10 11:36:39 +08:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2016-07-19 22:42:22 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
2013-08-14 15:27:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:11 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:09 -06:00
|
|
|
|
2013-08-14 15:27:11 -06:00
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:09 -06:00
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:11 -06:00
|
|
|
|
2013-08-14 15:27:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:52 +02:00
|
|
|
|
2013-08-14 15:27:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:55 +02:00
|
|
|
|
2013-08-14 15:27:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:55 +02:00
|
|
|
|
2013-08-14 15:27:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:55 +02:00
|
|
|
|
2013-08-14 15:27:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:52 +02:00
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:55 +02:00
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2013-12-13 20:08:59 +02:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2016-04-28 15:34:54 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2014-04-17 15:48:29 +08:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:55:01 +00:00
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:53 +02:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-10-22 11:44:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:53 +02:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-27 17:09:39 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
|
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2017-07-23 19:55:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2017-07-23 19:55:48 +03:00
|
|
|
|
2015-03-17 16:46:33 -04:00
|
|
|
|
2014-11-27 17:56:07 +00:00
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 20:19:24 +08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-23 16:38:27 +01:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
2013-08-28 21:24:17 +01:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-11 11:23:38 +01:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dt: add property iteration helpers
This patch adds macros of_property_for_each_u32() and
of_property_for_each_string(), which iterate over an array of values
within a device-tree property. Usage is for example:
struct property *prop;
const __be32 *p;
u32 u;
of_property_for_each_u32(np, "propname", prop, p, u)
printk("U32 value: %x\n", u);
struct property *prop;
const char *s;
of_property_for_each_string(np, "propname", prop, s)
printk("String value: %s\n", s);
Based on work by Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-04 09:27:46 -06:00
|
|
|
|
2015-03-12 17:17:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2017-09-26 15:25:10 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-10 22:01:48 +01:00
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|