]> git.itanic.dy.fi Git - linux-stable/commit
dt: dt-extract-compatibles: Add flag for driver matching compatibles
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Mon, 28 Aug 2023 21:13:11 +0000 (17:13 -0400)
committerRob Herring <robh@kernel.org>
Wed, 20 Sep 2023 19:25:10 +0000 (14:25 -0500)
commit365ba0c7a73cce407bf40cdf9900b86b945d4acb
tree36862dd349aabe419eef0f709fcdb1a88d39ecd1
parenteb2139fc0da63b89a2ad565ecd8133a37e8b7c4f
dt: dt-extract-compatibles: Add flag for driver matching compatibles

Add a new flag, '--driver-match', to the dt-extract-compatibles script
that causes it to only print out compatibles that are expected to match
a driver. This output can then be used by tests to detect device probe
failures.

In order to filter the compatibles down to only ones that will match to
a driver, the following is considered:
- A compatible needs to show up in a driver's of_match_table for it to
  be matched to a driver
- Compatibles that are used in both of_match_table and OF_DECLARE type
  macros can't be expected to match to a driver and so are ignored.
  One exception is CLK_OF_DECLARE_DRIVER, since it indicates that a
  driver will also later probe, so compatibles in this macro are not
  ignored.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20230828211424.2964562-3-nfraprado@collabora.com
Signed-off-by: Rob Herring <robh@kernel.org>
scripts/dtc/dt-extract-compatibles