mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
Several drivers duplicate same code for getting reference to the root node, matching it against 'struct of_device_id' table and getting out the match data from the table entry. There is a of_machine_compatible_match() wrapper but it takes array of strings, which is not suitable for many drivers since they want the driver data associated with each compatible. Add two wrappers, similar to existing of_device_get_match_data(): 1. of_machine_device_match() doing only matching against 'struct of_device_id' and returning bool. 2. of_machine_get_match_data() doing the matching and returning associated driver data for found compatible. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20251112-b4-of-match-matchine-data-v2-1-d46b72003fd6@linaro.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> |
||
|---|---|---|
| .. | ||
| unittest-data | ||
| .kunitconfig | ||
| address.c | ||
| base.c | ||
| cpu.c | ||
| device.c | ||
| dynamic.c | ||
| empty_root.dts | ||
| fdt.c | ||
| fdt_address.c | ||
| irq.c | ||
| Kconfig | ||
| kexec.c | ||
| kobj.c | ||
| kunit_overlay_test.dtso | ||
| Makefile | ||
| module.c | ||
| of_kunit_helpers.c | ||
| of_numa.c | ||
| of_private.h | ||
| of_reserved_mem.c | ||
| of_test.c | ||
| overlay.c | ||
| overlay_test.c | ||
| pdt.c | ||
| platform.c | ||
| property.c | ||
| resolver.c | ||
| unittest.c | ||