firmware: raspberrypi: Introduce rpi_firmware_find_node()
authormaxime@cerno.tech <maxime@cerno.tech>
Thu, 20 Oct 2022 09:12:09 +0000 (11:12 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Sat, 5 Nov 2022 12:31:07 +0000 (12:31 +0000)
commit82e5f04dfb9bb91ce5841ecb42b3439ddc4b7cde
tree3d58b21000cfb37df09b720a5c54ab0b56e837c7
parent9578649a2d9b296b34b640b40cd41ba47b60773b
firmware: raspberrypi: Introduce rpi_firmware_find_node()

A significant number of RaspberryPi drivers using the firmware don't
have a phandle to it, so end up scanning the device tree to find a node
with the firmware compatible.

That code is duplicated everywhere, so let's introduce a helper instead.

Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v4-1-a1b40526df3e@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/firmware/raspberrypi.c
include/soc/bcm2835/raspberrypi-firmware.h