soc: qcom: smd-rpm: Match rpmsg channel instead of compatible
authorStephan Gerhold <stephan@gerhold.net>
Thu, 15 Jun 2023 16:50:37 +0000 (18:50 +0200)
committerBjorn Andersson <andersson@kernel.org>
Fri, 14 Jul 2023 05:18:56 +0000 (22:18 -0700)
commitbcabe1e09135cd4fc1f5cddc6d4a45a221a768cc
tree9a8e7646d37a32521e6b360a6ce6b14fd671f8f8
parent029bf2941901cc57de0ae008bbd4c5c0717ab39b
soc: qcom: smd-rpm: Match rpmsg channel instead of compatible

There is an ever growing list of compatibles in the smd-rpm.c driver.
A fallback compatible would help here but would still require keeping
the current list around for backwards compatibility.

As an alternative, let's switch the driver to match the rpmsg_device_id
instead, which is always "rpm_requests" on all platforms. Add a check
to ensure that there is a device tree node defined for the device since
otherwise the of_platform_populate() call will operate on the root node (/).

Similar approaches with matching rpmsg_device_id are already used in
qcom_sysmon, qcom_glink_ssr, qrtr, and rpmsg_wwan_ctrl.

Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # SM6375 (G-Link)
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20230531-rpm-rproc-v3-4-a07dcdefd918@gerhold.net
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/smd-rpm.c