OSDN Git Service

firmware: raspberrypi: Introduce rpi_firmware_find_node()
authorMaxime Ripard <maxime@cerno.tech>
Thu, 27 Oct 2022 12:52:41 +0000 (14:52 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 28 Oct 2022 11:03:19 +0000 (13:03 +0200)
commitbc63897bc33b81897c7f8f5965c8f9326457d082
tree7f42620831dfcbaab0ce0a1a6e50f7b16faec11c
parent3e4a21a29dd924995f1135cd50e8b7e0d023729c
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.

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-1-fe9e7ac8b111@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/firmware/raspberrypi.c
include/soc/bcm2835/raspberrypi-firmware.h